mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 05:26:15 -08:00
init
This commit is contained in:
1 parent
fa3c70e99f
commit
26fba8e2a6
5 files changed
+21
-2
No files matched your search
@@ -58,6 +58,7 @@
|
||||
<div class="part-right">
|
||||
<div class="video-wrap">
|
||||
<div class="artplayer-app"></div>
|
||||
<div class="danmuku"></div>
|
||||
</div>
|
||||
<div class="console"></div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
export default class Control {
|
||||
constructor(danmuku) {
|
||||
this.danmuku = danmuku;
|
||||
this.apps = new Map();
|
||||
}
|
||||
|
||||
mount() {
|
||||
//
|
||||
}
|
||||
|
||||
unmount() {
|
||||
//
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,14 +1,19 @@
|
||||
import Danmuku from './danmuku';
|
||||
import Control from './control';
|
||||
|
||||
export default function artplayerPluginDanmuku(option) {
|
||||
return (art) => {
|
||||
const danmuku = new Danmuku(art, option);
|
||||
const control = new Control(danmuku);
|
||||
|
||||
return {
|
||||
name: 'artplayerPluginDanmuku',
|
||||
emit: danmuku.emit.bind(danmuku),
|
||||
config: danmuku.config.bind(danmuku),
|
||||
hide: danmuku.hide.bind(danmuku),
|
||||
show: danmuku.show.bind(danmuku),
|
||||
mount: control.mount.bind(control),
|
||||
unmount: control.unmount.bind(control),
|
||||
get isHide() {
|
||||
return danmuku.isHide;
|
||||
},
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"player"
|
||||
],
|
||||
"dependencies": {
|
||||
"option-validator": "^2.0.6",
|
||||
"screenfull": "^6.0.1"
|
||||
"option-validator": "^2.0.6"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user