开发者

playing audio in a div

I would like to play audio (mp3) and video (flv) file in a div from a url. I have tried audio and开发者_Go百科 video tag of html5 but that only supported .ogg format in firefox . I had also implemented with the shadowbox but i want some other method to implement it.

Please advise how can i do it .

Thanks


Use a flash player or wait till HTML5 supports more formats, or convert your mp3.


My suggestion is that you go with HTML5 where browsers support it and then use a fallback to a SWF-based player. One solution I found useful is the Google media player used in GMail and Google Reader.

A native browser implementation of a player is generally more efficient both battery-wise and performance-wise than the SWF-wrapped functionality.

http://labnol.blogspot.com/2006/08/google-mp3-player-found-in-gmail.html

Here's one idea of using HTML5 for video with a Flash fallback: http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-html-5-video-with-a-fallback-to-flash/


IF you are trying to play audio, I would suggest the following audio player: http://wpaudioplayer.com/standalone

It works great on sites that I have done.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜