audiojs icon indicating copy to clipboard operation
audiojs copied to clipboard

how to add listener for 'timeupdate' event

Open davewallace opened this issue 12 years ago • 0 comments

Hi,

I currently have a working script that loops through all instances and sets handlers for 'play', 'pause' and a few other events. They work nicely.

What I can't do, is listen to the 'timeupdate' event.

When I throw a console.log() call into the audiojs source, within the 'timeupdate' handler - that logs out. When I add a handler as I have for play and pause - it doesn't.

audiojs.instances[a].addHandler('pause', function (e) {
    console.log('pause'); // works as expected
});
audiojs.instances[a].addHandler('ended', function (e) {
    console.log('ended'); // works as expected
});
audiojs.instances[a].addHandler('timeupdate', function (e) {
    console.log('timeupdate'); // doesn't work
});

Any ideas?

davewallace avatar Feb 18 '14 00:02 davewallace