LightWeightMusicPlayer

Light Weight Music Player

Author: esterTion


A quick demo can be found here


Parameter

MusicPlayer accepts an object with following properties as parameter


Default config

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
}

Example config

{
	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接收一个包含以下属性的对象为参数