Author: esterTion
A quick demo can be found here
MusicPlayer accepts an object with following properties as parameter
This will be overwrote by config passed to the function
{
color:{
played:'#FFFFFF',
buffered:'#C8C7C7',
blank:'#918F8F',
border:'#000000'
},
id:'MusicPlayer_'+Date.now(),
borderWidth:0,
autoPlay:false,
loop:false
}
{
element:document.getElementById('music_container'),
src:'https://estertion.win/DREAMCATCHER.m4a',
id:'LightWeightPlayer',
borderWidth:'1px',
autoPlay:true,
loop:true,
color:{
played:'#E05959',
buffered:'#FFA7A7',
blank:'#EEE',
border:'#DDD'
}
}
示例页面在这里
MusicPlayer接收一个包含以下属性的对象为参数