mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51:20 -08:00
add more event
This commit is contained in:
1 parent
b2159e7d4d
commit
506b34522b
14 files changed
+202
-77
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user