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/11865Therefore 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 ~~
-
[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.
-
[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?
-
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.