JSFiddle - React, Tailwind, and code Playground
by robaldred
HTML
<script src="http://code.createjs.com/preloadjs-0.3.0.min.js"></script>
<script src="http://code.createjs.com/soundjs-0.4.0.min.js"></script>
<button id="play">Play</button>
<button id="stop">Stop</button>
JavaScript
var manifest = [
{id:"waiting_with_m4a", src:"http://stardotserver.co.uk/waiting2.m4a|http://stardotserver.co.uk/waiting2.ogg"}
]
var preload = new createjs.LoadQueue()
preload.installPlugin(createjs.Sound)
preload.loadManifest(manifest)
$('#play').on('click',function() {
createjs.Sound.play("waiting_with_m4a", createjs.Sound.INTERRUPT_NONE, 0, 0, -1, .5)
});
$('#stop').on('click',function() {
createjs.Sound.stop()
});