add more event

This commit is contained in:
Harvey Zack committed 2018-10-18 11:17:37 +08:00
1 parent b2159e7d4d
commit 506b34522b
14 files changed
+202 -77

No files matched your search

+3
View File
@@ -24,9 +24,11 @@ export const instances = [];
class Artplayer extends Emitter {
constructor(option) {
super();
this.art.emit('init:start');
this.option = Object.assign({}, Artplayer.DEFAULTS, option);
verification(this.option);
this.init();
this.art.emit('init:end');
}
static get version() {
@@ -111,6 +113,7 @@ class Artplayer extends Emitter {
this.events.destroy();
this.refs.$container.innerHTML = '';
instances.splice(instances.indexOf(this), 1);
this.art.emit('destroy');
}
}