[Solved] I want to run youtube video or embed code in my qml application.
I am developing Qt html5 application i put following embed code:
- <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
but it is not working on my N950 device. when i am open youtube on default browser , youtube video also not running on browser.
Hi, I have opened just now for test (I was already sure) http://www.youtube.com and I see any video with the N950 browser. It is possible that you have some problem or some component not installed correctly on your device. As is, it is also possible that your program works but the device not due to this problem. The advice I can give to you is to reset the device and if it already has problems reflast the N950.
I would like to suggest you to use QtMultimediaKit to play videos. Also take a look at youtube API [code.google.com]
Another thing to take care for youtube, are cookies. Since some time, to get streams to play, youtube wants cookies that are retrieved when a search is made (I don’t know, but maybe if you use a developer key, cookies are not needed).
Can QtMultimediaKit (Video or Audio) control play videos from youtube ? or some websource like “http://abc.com/abc.wav” ?
sorry for the late, my site get down. I made a software that maybe you will be find interesting for your purpose. The new address is here [marcobavagnoli.wordpress.com]
but there is not yet the page with N950 port made with c++/QML even if it wont be usefull because the youtube query and video player is made in c++. If you want to try it its available only .deb file for now, here [my-meego.com]
But, playing youtube video, is not so simple like assign to “Video::source” the url of the video. You must first query youtube API for infos about the video you are willing to play (look at my previous post to get the youtube API page). The query will be returned in xml/json format containing all the video infos. Next step will be to assign the right video url address to Video component. That’s something all :)
In my previous post I told you about cookies. In QML isn’t possible yet to pass cookies to Video element. In my app I made my own component subclassing QDeclarativeItem to play video with QMediaPlayer. But I think that with a YouTube developer key it is not needed.
hope this helps