I have the following code to play HTML5 video on website:
<video autoplay loop poster="">
<source src="http://www.domain.com/uploads/videos/video.mp4" type="video/mp4;">
<source src="http://www.domain.com/uploads/videos/video.webm" type="video/webm"/>
<source src="http://www.domain.com/uploads/videos/video.ogg" type="video/ogg"/>
<p> Your browser does not support HTML5 video. Please upgrade to a modern browser to view the video.</p>
</video>
I tried this on Firefox 3.6 and it shows a blank page instead of playing the video. Is there a way to fix this? Thanks.
Firefox 3.6 does support HTML 5 video , so the behaviour you are experiencing is correct.
Use JavaScript to detect when no sources have loaded and provide alternatives with DOM manipulation.
Your server is probably serving it as application/octet-stream.
Check your content types are correct:
.ogg application/ogg
.ogv video/ogg
.mp4 video/mp4
I don't know your server setup but if you are using apache add this to your .htaccess:
AddType application/ogg .ogg
AddType video/ogg .ogv
AddType video/mp4 .mp4 .m4v
AddType video/webm .webm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.