JSFiddle - React, Tailwind, and code Playground

by edwardsharp

HTML

<script src="http://code.createjs.com/soundjs-0.5.0.min.js"></script>
<script src="http://code.createjs.com/preloadjs-0.3.0.min.js"></script>
<button id="play">Play</button>
<button id="stop">Stop</button>

JavaScript

var manifest = [
    {id:"waiting", src:"http://futuredeathtoll.com/upload/filez/djhrn.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, 1)
});
$('#stop').on('click',function() {
    createjs.Sound.stop()
});