Fix bug: Symbol is not defined

This commit is contained in:
DIYgod
2016-05-14 21:40:03 +08:00
parent 04e950b1eb
commit 47270238cb
4 changed files with 9 additions and 10 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "aplayer",
"version": "1.4.3",
"version": "1.4.4",
"description": "Wow, such a beautiful html5 music player",
"main": "dist/APlayer.min.js",
"scripts": {
+6 -7
View File
@@ -1,5 +1,4 @@
(() => {
let instances = [];
((instances) => {
class APlayer {
/**
@@ -128,12 +127,12 @@
// define APlayer events
this.eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];
this.event = {};
for (let type of this.eventTypes) {
this.event[type] = [];
for (let i = 0; i < this.eventTypes.length; i++) {
this.event[this.eventTypes[i]] = [];
}
this.trigger = (type) => {
for (let func of this.event[type]) {
func();
for (let i = 0; i < this.event[type].length; i++) {
this.event[type][i]();
}
}
}
@@ -623,4 +622,4 @@
else {
window.APlayer = APlayer;
}
})();
})([]);