Firefox won't play .webm and .ogv videos with HTML5

前端 未结 3 1675
失恋的感觉
失恋的感觉 2021-01-21 18:12

I prepared 3 video formats for my site:

/assets/video/background-purple.ogg
/assets/video/background-purple.webm
/assets/video/background-purple.mp4
3条回答
  •  不知归路
    2021-01-21 18:40

    Seems I've found a solution:

    I switched my ogv codec from VP8 to Theora 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.

提交回复
热议问题