The fastest way to get started is to serve JavaScript from the Github (also you can download it):
<script src="http://raw.githubusercontent.com/Urinx/Muzik.js/master/muzik.js"></script>
<script src="http://raw.githubusercontent.com/Urinx/Muzik.js/master/muzik.min.js"></script>
// Assume you have the following element
<canvas id="canvas" width="600" height="300"></canvas>
// It's very easy to use Muzik.js
<script>
var M = new Muzik({
load: './demo.mp3',
canvas: '#canvas',
draw_conf: {
type: 'foldline',
color: '#fff',
lineWidth: 2,
k: 0.05,
n: 25,
},
});
</script>
Let's try to drag a music file into the left area and wait to see what will happen:
<script>
var M = new Muzik({
input: '#uploadedFile',
canvas: '#canvas',
});
</script>
Learn more