开发者

Firefox To Play Ogg

I have an ogg/audio file converted from mp3 using Alt WAV MP3 Ogg Converter. When I drag and drop the file in Firefox or in Google Chrome, 开发者_如何学Gothe audio plays nicely. But when a use the following code to place the file inside a page it only works on Chrome.

My code is simple as that:

<audio controls>  
     <source src="foo.ogg" type="audio/ogg">  
</audio>

Someone can tell me why?

Thanks


I think you can find your answer here. In my case I had to add MIME types to our nginx server.


Because this works on IE:

<source src="foo.ogg" type="audio/mp3">` 

And this works on Chrome, Mozilla, Safari, Opera

<source src="foo.ogg" type="audio/ogg"> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜