添加更多配置选项

This commit is contained in:
Harvey Zack committed 2018-10-31 16:45:49 +08:00
1 parent 504d5b3954
commit 518652ebd2
7 files changed
+65 -9

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
export default class FullscreenWeb {
constructor(option) {
this.option = option;
}
apply(art) {
this.art = art;
}
}
+11 -4
View File
@@ -1,6 +1,7 @@
import { setStyle } from '../utils';
import Danmu from './danmu';
import Fullscreen from './fullscreen';
import FullscreenWeb from './fullscreen-web';
import Pip from './pip';
import PlayAndPause from './playAndPause';
import Progress from './progress';
@@ -85,15 +86,21 @@ export default class Controls {
}));
this.add(new Pip({
disable: false,
disable: !this.art.option.pip,
position: 'right',
index: 60
}));
this.add(new Fullscreen({
disable: false,
this.add(new FullscreenWeb({
disable: !this.art.option.fullscreenWeb,
position: 'right',
index: 70
index: 80
}));
this.add(new Fullscreen({
disable: !this.art.option.fullscreen,
position: 'right',
index: 90
}));
this.art.option.controls.forEach(item => {
+3
View File
@@ -67,6 +67,9 @@ class Artplayer extends Emitter {
loading: '',
theme: '#f00',
hotkey: true,
pip: true,
fullscreen: true,
fullscreenWeb: true,
subtitle: {
url: '',
style: {}
+3
View File
@@ -61,6 +61,9 @@ export default {
loading: 'string',
theme: 'string',
hotkey: 'boolean',
pip: 'boolean',
fullscreen: 'boolean',
fullscreenWeb: 'boolean',
subtitle: {
type: 'object',
child: {