mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
add mse
This commit is contained in:
1 parent
b74ff6052c
commit
495782f5c6
11 files changed
+504
-7
No files matched your search
+5
-1
@@ -4,6 +4,7 @@ import Emitter from 'tiny-emitter';
|
||||
import Template from './template';
|
||||
import I18n from './i18n';
|
||||
import Player from './player';
|
||||
import Mse from './mse';
|
||||
import Controls from './controls';
|
||||
import Contextmenu from './contextmenu';
|
||||
import Danmaku from './danmaku';
|
||||
@@ -35,6 +36,8 @@ class Artplayer extends Emitter {
|
||||
volume: 0.7,
|
||||
autoplay: false,
|
||||
preload: 'auto',
|
||||
type: '',
|
||||
mimeCodec: '',
|
||||
lang: navigator.language.toLowerCase()
|
||||
};
|
||||
}
|
||||
@@ -66,6 +69,7 @@ class Artplayer extends Emitter {
|
||||
this.template = new Template(this);
|
||||
this.i18n = new I18n(this);
|
||||
this.player = new Player(this);
|
||||
this.mse = new Mse(this);
|
||||
this.controls = new Controls(this);
|
||||
this.contextmenu = new Contextmenu(this);
|
||||
this.danmaku = new Danmaku(this);
|
||||
@@ -79,7 +83,7 @@ class Artplayer extends Emitter {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.destroyEvents.forEach(event => event.destroy());
|
||||
this.destroyEvents.forEach(event => event());
|
||||
this.refs.container.innerHTML = '';
|
||||
instances.splice(instances.indexOf(this), 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user