mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -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="part-right">
|
||||||
<div class="video-wrap">
|
<div class="video-wrap">
|
||||||
<div class="artplayer-app"></div>
|
<div class="artplayer-app"></div>
|
||||||
|
<div class="danmuku"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="console"></div>
|
<div class="console"></div>
|
||||||
</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 Danmuku from './danmuku';
|
||||||
|
import Control from './control';
|
||||||
|
|
||||||
export default function artplayerPluginDanmuku(option) {
|
export default function artplayerPluginDanmuku(option) {
|
||||||
return (art) => {
|
return (art) => {
|
||||||
const danmuku = new Danmuku(art, option);
|
const danmuku = new Danmuku(art, option);
|
||||||
|
const control = new Control(danmuku);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: 'artplayerPluginDanmuku',
|
name: 'artplayerPluginDanmuku',
|
||||||
emit: danmuku.emit.bind(danmuku),
|
emit: danmuku.emit.bind(danmuku),
|
||||||
config: danmuku.config.bind(danmuku),
|
config: danmuku.config.bind(danmuku),
|
||||||
hide: danmuku.hide.bind(danmuku),
|
hide: danmuku.hide.bind(danmuku),
|
||||||
show: danmuku.show.bind(danmuku),
|
show: danmuku.show.bind(danmuku),
|
||||||
|
mount: control.mount.bind(control),
|
||||||
|
unmount: control.unmount.bind(control),
|
||||||
get isHide() {
|
get isHide() {
|
||||||
return danmuku.isHide;
|
return danmuku.isHide;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
"player"
|
"player"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"option-validator": "^2.0.6",
|
"option-validator": "^2.0.6"
|
||||||
"screenfull": "^6.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user