简体   繁体   中英

HTML5 background video still not playing of Firefox

Sup guys. Same issue here:
HTML5 video not playing in Firefox
except my background video is still not showing after I added

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

to my .htaccess file I created in the same folder as my videos

This is the page its supposed to play in: http://wearerocketscience.com/wordpress/contact/

Please help :) TY

I saw this answer at Firefox won't play .webm and .ogv videos with HTML5

Taken from Fez Vrasta:

Seems I've found a solution:

I switched my ogv codec from VP8 to Tehora and now Firefox can play video correctly.

I used this code for the source:

The MIMEtype is:

AddType video/ogg .ogv .ogg And the codec is:

Xiph.org's Theora Video (theo) I guess it could work also for .webm but I've not tested it.

While the server seems to serve the correct mime types (webm and ogv play just fine when accessing directly) your <source> definitions are bogus:

<video id="video_background" preload="auto" autoplay="true" loop="loop" muted="muted" volume="0">
    <source src="http://wearerocketscience.com/wordpress/wp-content/themes/twentytwelve/videos/contact.mp4"
      type="video/mp4">
    <source src="http://wearerocketscience.com/wordpress/wp-content/themes/twentytwelve/videos/contact.webm"
      type="videos/webm">
    <source src="http://wearerocketscience.com/wordpress/wp-content/themes/twentytwelve/videos/contact.ogv"
      type="video/ogv">
 </video>

It is video/webm (not videos ) and video/ogg (not ogv ).

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM