mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
add creatWorker
This commit is contained in:
1 parent
6cc89edcd9
commit
39f8c157ac
9 files changed
+222
-56
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import Emitter from 'tiny-emitter';
|
||||
import checkSupport from './utils/checkSupport';
|
||||
import EventProxy from './eventProxy';
|
||||
import CreatWorker from './creatWorker';
|
||||
import CreatMediaSource from './creatMediaSource';
|
||||
import FlvParse from './flvParse';
|
||||
import * as utils from './utils';
|
||||
@@ -39,12 +40,14 @@ class Flv extends Emitter {
|
||||
|
||||
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();
|
||||
Flv.instances.splice(Flv.instances.indexOf(this), 1);
|
||||
this.emit('destroy');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user