I am building a php-based website. I want when the main page loads, then play a random song from a folder of songs. there should be a play, pause, stop control for the song. a flash player would do that. but i cannot 开发者_StackOverflow社区find a suitable one. can anyone give me an idea?
There are many utilities available to do this. One of the more popular ones (that I have used before) is JWPlayer. It has a large set of features and even has a wizard to help with setup. Additionally, it is beginning to support HTML5 (assuming you are playing an HTML5-compatible file and your client is using a browser that supports HTML5 - otherwise, it will fall back to Flash).
Just a note: This player is free (and open-source, as far as I can remember), but the licensing can be odd (for example, use on commercial websites might require payment).
You could use MediaElement.
It does html5 audio tags, with a fallback to a flash player when those are available.
Try JWPlayer or flowplayer. JWPlayer is free to use, but commercial use requires some expensive licensing. FlowPlayer is completely free.
http://www.longtailvideo.com/
http://www.flowplayer.org
精彩评论