分离flv文件夹

This commit is contained in:
Harvey Zack committed 2018-12-14 16:32:25 +08:00
1 parent 2e0d70292b
commit f8400002c2
9 files changed
+339 -54

No files matched your search

+9 -17
View File
@@ -1,23 +1,15 @@
import checkSupport from './checkSupport';
import CreatMediaSource from './creatMediaSource';
class Flv {
constructor(art) {
checkSupport(art);
this.mediaSource = new CreatMediaSource(art);
this.load = url => {
console.log(url);
};
}
}
import Flv from './flv';
function artplayerPluginFlv(art) {
const flv = new Flv(art);
const {
template: { $video },
} = art;
return {
load: url => new Promise(resolve => {
flv.load(url);
return resolve(flv.mediaSource.url);
}),
load: url =>
new Promise(resolve => {
const flv = new Flv($video, url);
return resolve(flv.mediaSource.url);
}),
};
}