Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91566de67a | ||
|
|
7b8ad10c04 |
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aplayer",
|
"name": "aplayer",
|
||||||
"version": "1.4.4",
|
"version": "1.4.5",
|
||||||
"description": "Wow, such a beautiful html5 music player",
|
"description": "Wow, such a beautiful html5 music player",
|
||||||
"main": "dist/APlayer.min.js",
|
"main": "dist/APlayer.min.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+21
-9
@@ -263,7 +263,12 @@
|
|||||||
if (musicIndex !== this.playIndex) {
|
if (musicIndex !== this.playIndex) {
|
||||||
this.setMusic(musicIndex);
|
this.setMusic(musicIndex);
|
||||||
}
|
}
|
||||||
this.play();
|
if (this.isMobile) {
|
||||||
|
this.pause();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.play();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -480,16 +485,23 @@
|
|||||||
this.ended = false;
|
this.ended = false;
|
||||||
if (this.multiple) {
|
if (this.multiple) {
|
||||||
this.audio.addEventListener('ended', () => {
|
this.audio.addEventListener('ended', () => {
|
||||||
if (this.playIndex < this.option.music.length - 1) {
|
if (this.isMobile) {
|
||||||
this.setMusic(++this.playIndex);
|
|
||||||
}
|
|
||||||
else if (this.loop) {
|
|
||||||
this.setMusic(0);
|
|
||||||
}
|
|
||||||
else if (!this.loop) {
|
|
||||||
this.ended = true;
|
this.ended = true;
|
||||||
this.pause();
|
this.pause();
|
||||||
this.trigger('ended');
|
return;
|
||||||
|
}
|
||||||
|
if (this.audio.currentTime !== 0) {
|
||||||
|
if (this.playIndex < this.option.music.length - 1) {
|
||||||
|
this.setMusic(++this.playIndex);
|
||||||
|
}
|
||||||
|
else if (this.loop) {
|
||||||
|
this.setMusic(0);
|
||||||
|
}
|
||||||
|
else if (!this.loop) {
|
||||||
|
this.ended = true;
|
||||||
|
this.pause();
|
||||||
|
this.trigger('ended');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user