This commit is contained in:
Harvey Zack committed 2018-10-19 18:01:39 +08:00
1 parent e988f00cf8
commit 30456c9873
12 files changed
+121 -125

No files matched your search

+1 -24
View File
@@ -1,8 +1,6 @@
import { append, setStyle } from '../utils';
import validControl from '../verification/control';
import Danmu from './danmu';
import Fullscreen from './fullscreen';
import Highlight from './highlight';
import Pip from './pip';
import PlayAndPause from './playAndPause';
import Progress from './progress';
@@ -29,32 +27,20 @@ export default class Controls {
this.add({
control: Progress,
disable: false,
html: '',
position: 'top',
index: 10
});
this.add({
control: Highlight,
control: Screenshot,
disable: false,
html: '<div class="art-progress-highlight"></div>',
position: 'top',
index: 20
});
this.add({
control: Screenshot,
disable: false,
html: '<div class="art-progress-screenshot"></div>',
position: 'top',
index: 30
});
this.add({
control: PlayAndPause,
disable: false,
html: 'PlayAndPause',
tooltip: 'PlayAndPause',
position: 'left',
index: 10
});
@@ -62,7 +48,6 @@ export default class Controls {
this.add({
control: Volume,
disable: false,
html: 'Volume',
tooltip: 'Volume',
position: 'left',
index: 20
@@ -71,7 +56,6 @@ export default class Controls {
this.add({
control: Time,
disable: false,
html: 'Time',
tooltip: 'Volume',
position: 'left',
index: 30
@@ -80,7 +64,6 @@ export default class Controls {
this.add({
control: Danmu,
disable: false,
html: 'Danmu',
tooltip: 'Danmu',
position: 'right',
index: 10
@@ -89,7 +72,6 @@ export default class Controls {
this.add({
control: Subtitle,
disable: false,
html: 'Subtitle',
tooltip: 'Subtitle',
position: 'right',
index: 20
@@ -98,7 +80,6 @@ export default class Controls {
this.add({
control: Setting,
disable: false,
html: 'Setting',
tooltip: 'Setting',
position: 'right',
index: 30
@@ -107,7 +88,6 @@ export default class Controls {
this.add({
control: Pip,
disable: false,
html: 'Pip',
tooltip: 'Pip',
position: 'right',
index: 40
@@ -116,7 +96,6 @@ export default class Controls {
this.add({
control: Fullscreen,
disable: false,
html: 'Fullscreen',
tooltip: 'Fullscreen',
position: 'right',
index: 50
@@ -135,8 +114,6 @@ export default class Controls {
const $control = document.createElement('div');
$control.setAttribute('class', `art-control art-control-${name}`);
$control.setAttribute('data-control-index', String(option.index) || id);
setStyle($control, option.style || {});
append($control, option.html);
option.ref = $control;
this.commonMethod(option);
this[name] = new option.control(this.art, option);