MEDIA_ERR_SRC_NOT_SUPPORTED html5 audio woes

前端 未结 2 904
渐次进展
渐次进展 2021-01-11 12:56

I am working on an html5 audio player and everything is working fine when I server the .ogg file from the same host as the html page. When I put the ogg file in my cdn it fa

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-11 13:31

    The problem is the mime type you are serving the audio file with. It needs to be 'audio/ogg', 'application/ogg' or 'video/ogg' for Firefox to play it. Firefox doesn't do any form of 'content sniffing' to work out what format the file is in - it relies entirely on the mime type.

提交回复
热议问题