mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
分离部分工具函数
This commit is contained in:
1 parent
8ad0605e1a
commit
4658d3f4b4
6 files changed
+38
-37
No files matched your search
@@ -12,8 +12,11 @@ class Flv extends Emitter {
|
||||
constructor(options) {
|
||||
super();
|
||||
this.options = Object.assign({}, Flv.DEFAULTS, options);
|
||||
console.log(this.options);
|
||||
checkSupport(this.options);
|
||||
this.events = new EventProxy(this);
|
||||
this.workers = new CreatWorker(this);
|
||||
this.mediaSource = new CreatMediaSource(this);
|
||||
this.flvData = new FlvParse(this);
|
||||
id += 1;
|
||||
this.id = id;
|
||||
Flv.instances.push(this);
|
||||
@@ -38,13 +41,6 @@ class Flv extends Emitter {
|
||||
return utils;
|
||||
}
|
||||
|
||||
load() {
|
||||
this.events = new EventProxy(this);
|
||||
this.workers = new CreatWorker(this);
|
||||
this.mediaSource = new CreatMediaSource(this);
|
||||
this.flvData = new FlvParse(this);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.events.destroy();
|
||||
this.workers.killAll();
|
||||
|
||||
Reference in new issue
Block a user