Actually set the music to the audio element
In the default state, each audio element should already have the music url set. However, if a user externally adjusts the music stored on the APlayer and attempts to switch to it, everything _but_ the audio would change. This allows users to modify the music set in the options manually.
This commit is contained in:
parent
17c80e4083
commit
e7168ec462
|
|
@ -483,6 +483,7 @@ class APlayer {
|
|||
this.audio = this.audios[indexMusic];
|
||||
this.audio.volume = parseInt(this.element.getElementsByClassName('aplayer-volume')[0].style.height) / 100;
|
||||
this.audio.currentTime = 0;
|
||||
this.audio.src = this.music.url;
|
||||
}
|
||||
else {
|
||||
this.audio = document.createElement("audio");
|
||||
|
|
|
|||
Loading…
Reference in New Issue