mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
添加更多配置选项
This commit is contained in:
1 parent
504d5b3954
commit
518652ebd2
7 files changed
+65
-9
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export default class FullscreenWeb {
|
||||
constructor(option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
apply(art) {
|
||||
this.art = art;
|
||||
}
|
||||
}
|
||||
+11
-4
@@ -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 => {
|
||||
|
||||
@@ -67,6 +67,9 @@ class Artplayer extends Emitter {
|
||||
loading: '',
|
||||
theme: '#f00',
|
||||
hotkey: true,
|
||||
pip: true,
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
subtitle: {
|
||||
url: '',
|
||||
style: {}
|
||||
|
||||
@@ -61,6 +61,9 @@ export default {
|
||||
loading: 'string',
|
||||
theme: 'string',
|
||||
hotkey: 'boolean',
|
||||
pip: 'boolean',
|
||||
fullscreen: 'boolean',
|
||||
fullscreenWeb: 'boolean',
|
||||
subtitle: {
|
||||
type: 'object',
|
||||
child: {
|
||||
|
||||
Reference in new issue
Block a user