You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why does audio on iOS stop when unplugging headphones? #332
When playing the audio using soundJS and unplugging the headphones, audio is not playing in the speaker, but it runs in the background without any sound and calls the complete function. Could you please take a look at the code below? thanks
function load() {
var queue = new createjs.LoadQueue();
createjs.Sound.alternateExtensions = ["mp3"];
queue.installPlugin(createjs.Sound);
queue.addEventListener("fileload", handleFileLoad);
queue.addEventListener("complete", handleComplete);
queue.loadManifest({
id: "audio_1",
src: "http://commondatastorage.googleapis.com/codeskulptor-demos/DDR_assets/Kangaroo_MusiQue_-_The_Neverwritten_Role_Playing_Game.mp3",
});
}
function playIt() {
var instance = createjs.Sound.play('audio_1');
instance.on("complete", handleComplete2, this);
instance.on("error", function (e) { console.error(e); }, this);
}
Activity