We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b7f77 commit 5206eedCopy full SHA for 5206eed
1 file changed
src/APlayer.js
@@ -1,5 +1,4 @@
1
-(() => {
2
- let APlayers = [];
+((instances) => {
3
4
class APlayer {
5
/**
@@ -404,8 +403,8 @@
404
403
405
this.setMusic(0);
406
407
- APlayers.push(this);
408
- };
+ instances.push(this);
+ }
409
410
411
* Set music
@@ -557,9 +556,9 @@
557
556
558
// pause other players (Thanks @Aprikyblue)
559
if (this.option.mutex) {
560
- for (let i = 0; i < APlayers.length; i++) {
561
- if (this != APlayers[i]) {
562
- APlayers[i].pause();
+ for (let i = 0; i < instances.length; i++) {
+ if (this != instances[i]) {
+ instances[i].pause();
563
}
564
565
@@ -613,4 +612,4 @@
613
612
else {
614
window.APlayer = APlayer;
615
616
-})();
+})([]);
0 commit comments