Article Source: PHP Development Learning Portal
Address: http://www.php#thinking.com/archives/491 (go to some #)
In the Web page production, if want to insert MP3 music in the webpage to add the interactive feeling of the webpage, enhance the user experience degree, this time the webpage music player is very necessary, the general situation if uses the background music to play the words to have several very unfriendly places
1. Play when the page loads, the user cannot pause, stop playing
2. General browser compatibility is poor, it is very rare to general all browsers
Therefore, a flash-based web music player is necessary.
He has some of the following advantages
1. Browser compatibility is good, the general mainstream browser now supports Flash
2. Can pause, stop playback, or automatically play through the parameter settings
3. Beautiful style. Beautiful and generous
Let's start with a picture of the player.
To a demonstration:
Of course there are many more styles, please go to Demo:
http://www.linzl.com/demos/2012/dewplayer/
Web mp3 How to use music player:
Html:
<object type= "Application/x-shockwave-flash" Data= "Dewplayer.swf?mp3=mp3/test1.mp3" width= "$" height= "id=" Dewplayer "><param name=" wmode "value=" Transparent "/><param name=" movie "Value=" dewplayer.swf?mp3=mp3/ Test1.mp3 "/></object>
which
dewplayer.swf
is the path of the player, be sure to
Mp3=mp3/test1.mp3
This is the MP3 address behind this mp3=.
can be either absolute or relative address
Parameters:
Options
Default Volume |
volume=100 |
Usually between 0-100 |
Auto Play |
Autostart=true |
Automatically play when the page is finished loading |
Loop playback |
Autoreplay=true |
Play Music in a loop |
Random Play |
Randomplay=true |
Multiple MP3 can be played randomly |
Show time |
Showtime=true |
Show Playback time |
Disable Mouse |
Nopointer=true |
Disable cursor to player |
Play List |
Xml=Playlist.xml |
Load XML playlist (XSPF format) player, can load multiple files |
Gradient |
fading=3 |
No gaps (seconds) between one track, and the next player, can support gradients |
How to use the player parameters:
http://www.linzl.com/demos/2012/dewplayer/mp3/test1.mp3&autostart=1&showtime=1& Nopointer=1&volume=50
full version
<object type= "Application/x-shockwave-flash" Data= "http://www.linzl.com/demos/2012/dewplayer/dewplayer.swf" Width= "height=" id= "Dewplayer" name= "Dewplayer" > <param name= "wmode" value= "Transparent"/><param Name= "movie" value= "http://www.linzl.com/demos/2012/dewplayer/dewplayer.swf"/> <param name= "Flashvars" value = "mp3=http://demo.linzl.com/demos/2012/dewplayer/mp3/test1.mp3&autostart=1&showtime=1& Nopointer=1&volume=50 "/> </object>
Flash Web MP3 Player: http://tieba.baidu.com/p/3323774559
Recommended beautiful Flash web MP3 music player