mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51:20 -08:00
分离flv文件夹
This commit is contained in:
1 parent
2e0d70292b
commit
f8400002c2
9 files changed
+339
-54
No files matched your search
@@ -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);
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user