SoundJS test

by cpickard

HTML

<button id="ten-secs">Jump to 10 secs "...be with us in, er, 1 minute... ok"</button>

JavaScript

createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashPlugin]);
createjs.Sound.addEventListener("fileload", handleLoad);
createjs.Sound.registerSound("http://ivdemo.chaseits.co.uk/enron/20050204-4026(7550490)a.mp3", "sound");

function handleLoad(event) {
    var instance = createjs.Sound.play("sound");
    var ten = document.getElementById('ten-secs');
    ten.addEventListener('click', function (event) {
        instance.setPosition(10000);
    });
}