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 Ogg</button>
<button id="stop">Stop All</button>
JavaScript
var manifest = [
{id:"waiting", src:"http://stardotserver.co.uk/waiting2.ogg|http://stardotserver.co.uk/waiting2.mp3"}
]
var preload = new createjs.LoadQueue()
preload.installPlugin(createjs.Sound)
preload.loadManifest(manifest)
$('#play').on('click',function() {
createjs.Sound.play("waiting", createjs.Sound.INTERRUPT_NONE, 0, 0, -1, .5)
});
$('#stop').on('click',function() {
createjs.Sound.stop()
});