Correct me if I'm wrong but for HTML5 you should use a <video> tag and not <object>. Otherwise you would be playing the video via a plugin.
Correct me if I'm wrong but for HTML5 you should use a <video> tag and not <object>. Otherwise you would be playing the video via a plugin.
That's true Wysota,but I did the above because <video> tag seems to not working too.
Qt Code:
<!-- <video controls> <source src="ArchitectVideo_dvd.ogv" type="video/ogg"> </video> -->To copy to clipboard, switch view to plain text mode
This is how my code was during 1st attempt to play a video in QWebView.
Also,from what I know there will be issues to play .avi files via <video> tag,and that possibility is highly demanded in my application.
You'll be having issues in playing them (and all other) with the plugin api if you don't have a working plugin too.
This works for me without problems:
Qt Code:
#include <QtWidgets> #include <QWebView> int main(int argc, char **argv) { QWebView view; view.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
html Code:
<html> <body> <video width="1920" height="1080" controls> <source src="http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_surround.avi" type="video/mp4"/> </video> </body> </html>To copy to clipboard, switch view to plain text mode
Unfortunately,for me it does not.
Also,when I try to open the html in a browser (opera 12.17 and IE 11) it does not work too.
Tough luck, it's valid html5 code. You should at least get the (probably black) player rectangle, even if your browser cannot play the movie. You can replace the avi with some other format and try again.
Bookmarks