Using Qt 5.2.1, what do I need to do to support HTML5 video on mac and windows?



  • Specifically, I'm trying to get HTML5 video to load from youtube, using their embed code:

    <iframe width="640" height="360" src="//www.youtube.com/embed/l5ODwR6FPRQ?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>

    I'm using the pre-build libraries available from Qt Downloads.

    Are there specific QWebSettings that must be enabled? Do I have to bundle codecs, or ask the user to install something?

    Here's what I see when I tried:

    Mac 10.9.2

    • A black window flashes, and once (I think) the video is loaded and the thumbnail is ready to be shown, the iframe and contents entirely disappears. It's still in the dom, but invisible. The background-color of the element holding the iframe is what's shown... that's it.
    • If I click in the middle of the invisible iframe element, the video will play correctly (it comes bac,k and is visible). It does not disappear again. I have used developer tools to try and figure out what may be wrong, but nothing is obvious.

    Windows 8:

    • The video loads up, and the thumbnail displays (unlike on mac 10.9.2). But when I click play, I get 'This video is currently unavailable'. I think this is because I don't have the webm codec?

    Any help is greatly appreciated. I have scoured everything I can, but I just see a mismash of suggestions and alot of remarks of 'this isn't possible'. I can't figure out that state of this in QT...


  • Moderators

    "Have a look at this wiki":http://qt-project.org/wiki/Embed_YouTube_Video_in_QWebView

    Hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.