Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
audioObjects[id].onEndedCB = function () {
console.log("media::onEndedCB() - MEDIA_STATE -> MEDIA_STOPPED");
Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
};
stopPlayingAudio:function(win, lose, args) {
var id = args[0];
try {
var thisM = Media.get(id);
thisM.node.pause();
thisM.node.currentTime = 0;
Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
} catch (err) {
lose("Failed to stop: "+err);
}
},
var success = function () {
Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
};