Any ways for QtWebKit playing HTML5 video without installing flash player



  • I know that QtWebKit-2.2 is supposed to support for HTML5 media (audio/video), but not now.
    http://developer.qt.nokia.com/forums/viewthread/11865

    Therefore I tried Qt4.7.4 with simple code below.
    According to "http://www.youtube.com/html5", my example browser supports "Video tag" and "H.264". I thought that means I do not need to enable flash plugins to play youtube videos. But I was wrong; appending "&html5=True" to the video's address does not work at all.

    Is there any code missing or should I enable anything to play youtube video without using the flash plugin?

    Here is my code:

    @
    int main(int argc, char *argv[])
    {

    QApplication a(argc, argv);

    //QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);

    QWebView *view = new QWebView();
    view->load(QUrl("http://www.youtube.com/watch?v=cTl3U6aSd2w&html5=True"));
    view->show();
    return a.exec();
    }

    @

    Thanks



  • it looks like that qtwebkit cann't support video tag now ~~



  • I have Windows 7 Ultimate x86 and Qt 4.8.1. But it cannot play html5 video in QWebView widget. So how can I do this?



  • [quote author="xulinguestc" date="1332753263"]it looks like that qtwebkit cann't support video tag now ~~[/quote]

    hmm, but it must http://trac.webkit.org/wiki/QtWebKitFeatures22#WebDeveloperFeatures



  • As far as I know, WebKit supports video tag. In case of Linux it uses GStreamer to display video content.
    You can check if your browser supports it with
    "HTML5 Test":http://html5test.com/



  • [quote author="guziemic" date="1346325917"]As far as I know, WebKit supports video tag. In case of Linux it uses GStreamer to display video content.
    You can check if your browser supports it with
    "HTML5 Test":http://html5test.com/
    [/quote]

    I checked through QWebView and there isn't support in audio/video (But there is on Google Chrome which uses WebKit too). And what is it using on Windows? Maybe I need install something?



  • Please wait till new version of QtWebKit module will be released, although these versions should handle HTML5 video/audio, there are some issues (I don't remember which...)...In order to really have included HTML5 video/audio try Qt 4.8.2 or Qt 5.0 Beta libraries.



  • I tried with Qt 5.0 beta but it's not help..



  • Neither Qt 5.0 beta does not handle HTML5 video/audio? That's really strange. Hmm... may it be caused by not working multimedia plugin? (I think, this makes problems)....



  • [quote author="Peppy" date="1346409683"]Neither Qt 5.0 beta does not handle HTML5 video/audio? That's really strange. Hmm... may it be caused by not working multimedia plugin? (I think, this makes problems)....[/quote]

    I think this trouble only on Windows (and maybe on Mac). One guy on irc channel answered me that "<tronical> Twice: sorry, it's not implemented on Windows :("
    So I don't know what to do with my program which must view local html5-files.. So maybe I need to migrate from qt..

    P.S: what multimedia plugin?



  • Multimedia plugin handles Audio/Video, so I though, it was caused by that plugin, which does not work now.

    And does he said something more, or not? Why it is so...



  • bq. "<Twice> hi, do you know why it's not implemented on Windows?
    <tronical> it's a rather complicated piece that's simply not been written yet
    <tronical> sadly there is no backend in webkit that can easily be re-used
    <Twice> are you Qt developer or you know you just know it?
    <tronical> I'm a Qt developer
    <Twice> so I can't use Qt for building cross-platform html5-viewer?
    <tronical> indeed, I'm afraid you can't use Qt very well for that right now
    <Twice> and will it be in Qt 5.0 final release or you dont know?
    <tronical> I'm pretty sure it won't be in the final Qt 5.0.0 release"



  • In addition, with Qt 5 you will have possibility to use WebKit2 with has different API and different process management than already know WebKit1 with is in Qt 4.X
    That really make things more complicated ,especially when you get used to old API that pretty well expose all WebKit elements to Qt world.



  • So there you go. HTML 5 vids are not "possible" for now. Maybe using platform-depend core to play videos, just write Qt wrapper for

    • iOS - Safari (WebKit Core)
    • Android - Chrome (WebKit Core)
    • Windows (Phone) - MSIE - Trident Core

Log in to reply
 

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