From 17c80e4083a281058a13ea7a86ea2c07dae2ece4 Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Tue, 12 Dec 2017 13:40:39 -0500 Subject: [PATCH] Do not autoplay in mobile in `setMusic` This change appears to have been made to support playlist auto-advance in mobile. This was a workaround to handle the autoplay guard lower in the function which was removed in an earlier commit on this branch. The play call is now handled external to the `setMusic` call, which allows external logic to determine whether play should be called on mobile or not. --- src/APlayer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/APlayer.js b/src/APlayer.js index 35348f8..6e93a89 100644 --- a/src/APlayer.js +++ b/src/APlayer.js @@ -478,7 +478,6 @@ class APlayer { // get this audio object if (this.isMobile && this.audio) { this.audio.src = this.music.url; - this.play(); } else if (!this.isMobile && this.audios[indexMusic]) { this.audio = this.audios[indexMusic];