QWebKit and Video Cross Platform
-
Hi there,
i was just developing a project with QWebKit, it needs the html 5 video tag.
I was developing on Linux and it worked (although i never actually played a video, but the video player controls show up).
Now compiling first time on Windows (Qt 4.8/QtCreator 2.4.1), there is no support for the video tag... I thought QT was cross platform.
Is there a way to get the video tag on Windows to run?
Anyone tried it on mac yet?
-
Check which version of the Web Kit are you using on Windows. According to the official announcement I think that the video tag may be working on "web kit version 2.2":http://trac.webkit.org/wiki/QtWebKitFeatures22
-
Hm, this site says QtWebKit 2.2 is part of Qt 4.8, which i have installed. Does Qt deliver its own WebKit or does it use some system wide installation (which i don't remind installing).
-
[quote author="hellagot" date="1328347988"]Hm, this site says QtWebKit 2.2 is part of Qt 4.8, which i have installed. Does Qt deliver its own WebKit or does it use some system wide installation (which i don't remind installing).[/quote]
I made a quick Google research and it seems that other people are experiencing the same issues with video like you but I haven't seen a solution yet :( :
"QtWebKit 2.2 (from Qt 4.8 RC1) supports less than QtWebKit 2.0.2 (from Qt 4.7.4), test on html5test.com":http://developer.qt.nokia.com/forums/viewthread/11865
"QtWebKit playing HTML5 video without installing flash player":http://stackoverflow.com/questions/8650119/qtwebkit-playing-html5-video-without-installing-flash-player -
Did anything change in regards to this? I tried html5 video tag by creating new html5 application with default html page that I modified by adding video tag. It works on Mac but not on Windows. Anyone? Any workarounds for Windows?
@<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body { margin: 0; font-size: 2em; background-color: white; }
h1 { text-align: center; color: red; }
h1 + h1 { color: green; }
h1:last-child { color: blue; }
#quit { background-color: gray; color: white; font-weight: bold; display: block; text-align: right; }
</style>
[removed]
var counter = 0;
function toggleElement()
{
var elements = document.getElementsByTagName('h1');
for (var i = 0; i < elements.length; ++i)
elements[i].style.display = (counter % elements.length) == i ? '' : 'none';
counter++;
setTimeout('toggleElement()', 1000);
}
window.onload = function()
{
document.getElementById("quit").onmousedown = function()
{
Qt.quit();
};
toggleElement();
}
[removed]
</head>
<body>
<a id="quit">X</a>
<h1>Hello</h1>
<h1>HTML5</h1>
<h1>World</h1><video width="320" height="240" controls> <source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4"> <!--source src="http://www.w3schools.com/html/movie.ogg" type="video/ogg"> <source src="twnactive.mov" type="video/quicktime"--> Your browser does not support the video tag. </video> </body>
</html>
@ -
I've written a blog post about how I've solved this issue for our project. It involves building Qt + qt-mobility, and also a bug fix in qt-mobility. See http://blog.enthought.com/open-source/fun-with-qtwebkit-html5-video/
-
[quote author="RobinD42" date="1364852920"]I've written a blog post about how I've solved this issue for our project. It involves building Qt + qt-mobility, and also a bug fix in qt-mobility. See http://blog.enthought.com/open-source/fun-with-qtwebkit-html5-video/[/quote]
Great, thank you for sharing the solution. Why don't you create a brief article at "Qt Project's wiki":http://qt-project.org/wiki/ based on your blog post?
-
Hat down, Robin. So much work around it ... it should be really simple.