mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
update danmuku
This commit is contained in:
1 parent
31bd26a813
commit
a3889236be
10 files changed
+199
-9312
No files matched your search
@@ -1,23 +1,16 @@
|
||||
import Danmuku from './danmuku';
|
||||
import Control from './control';
|
||||
import setting from './setting';
|
||||
|
||||
export default function artplayerPluginDanmuku(option) {
|
||||
return (art) => {
|
||||
const danmuku = new Danmuku(art, option);
|
||||
const control = new Control(art, danmuku);
|
||||
|
||||
if (option.el) {
|
||||
control.mount(option.el);
|
||||
}
|
||||
|
||||
setting(art, 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;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user