mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
remove some disable
This commit is contained in:
1 parent
99bae1fab2
commit
d8b0477cdc
2 files changed
+114
-107
No files matched your search
@@ -26,33 +26,35 @@ export default class Contextmenu extends Component {
|
|||||||
events: { proxy },
|
events: { proxy },
|
||||||
} = this.art;
|
} = this.art;
|
||||||
|
|
||||||
this.add(
|
if (option.playbackRate) {
|
||||||
playbackRate({
|
this.add(
|
||||||
disable: !option.playbackRate,
|
playbackRate({
|
||||||
name: 'playbackRate',
|
name: 'playbackRate',
|
||||||
index: 10,
|
index: 10,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.aspectRatio) {
|
||||||
aspectRatio({
|
this.add(
|
||||||
disable: !option.aspectRatio,
|
aspectRatio({
|
||||||
name: 'aspectRatio',
|
name: 'aspectRatio',
|
||||||
index: 20,
|
index: 20,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.flip) {
|
||||||
flip({
|
this.add(
|
||||||
disable: !option.flip,
|
flip({
|
||||||
name: 'flip',
|
name: 'flip',
|
||||||
index: 30,
|
index: 30,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
this.add(
|
||||||
info({
|
info({
|
||||||
disable: false,
|
|
||||||
name: 'info',
|
name: 'info',
|
||||||
index: 40,
|
index: 40,
|
||||||
}),
|
}),
|
||||||
@@ -60,7 +62,6 @@ export default class Contextmenu extends Component {
|
|||||||
|
|
||||||
this.add(
|
this.add(
|
||||||
version({
|
version({
|
||||||
disable: false,
|
|
||||||
name: 'version',
|
name: 'version',
|
||||||
index: 50,
|
index: 50,
|
||||||
}),
|
}),
|
||||||
@@ -68,7 +69,6 @@ export default class Contextmenu extends Component {
|
|||||||
|
|
||||||
this.add(
|
this.add(
|
||||||
close({
|
close({
|
||||||
disable: false,
|
|
||||||
name: 'close',
|
name: 'close',
|
||||||
index: 60,
|
index: 60,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -49,28 +49,29 @@ export default class Control extends Component {
|
|||||||
init() {
|
init() {
|
||||||
const { option } = this.art;
|
const { option } = this.art;
|
||||||
|
|
||||||
this.add(
|
if (!option.isLive) {
|
||||||
progress({
|
this.add(
|
||||||
name: 'progress',
|
progress({
|
||||||
disable: option.isLive,
|
name: 'progress',
|
||||||
position: 'top',
|
position: 'top',
|
||||||
index: 10,
|
index: 10,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.thumbnails.url && !option.isLive && !isMobile) {
|
||||||
thumbnails({
|
this.add(
|
||||||
name: 'thumbnails',
|
thumbnails({
|
||||||
disable: !option.thumbnails.url || option.isLive || isMobile,
|
name: 'thumbnails',
|
||||||
position: 'top',
|
position: 'top',
|
||||||
index: 20,
|
index: 20,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
this.add(
|
||||||
loop({
|
loop({
|
||||||
name: 'loop',
|
name: 'loop',
|
||||||
disable: false,
|
|
||||||
position: 'top',
|
position: 'top',
|
||||||
index: 30,
|
index: 30,
|
||||||
}),
|
}),
|
||||||
@@ -79,7 +80,6 @@ export default class Control extends Component {
|
|||||||
this.add(
|
this.add(
|
||||||
playAndPause({
|
playAndPause({
|
||||||
name: 'playAndPause',
|
name: 'playAndPause',
|
||||||
disable: false,
|
|
||||||
position: 'left',
|
position: 'left',
|
||||||
index: 10,
|
index: 10,
|
||||||
}),
|
}),
|
||||||
@@ -88,83 +88,90 @@ export default class Control extends Component {
|
|||||||
this.add(
|
this.add(
|
||||||
volume({
|
volume({
|
||||||
name: 'volume',
|
name: 'volume',
|
||||||
disable: false,
|
|
||||||
position: 'left',
|
position: 'left',
|
||||||
index: 20,
|
index: 20,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.add(
|
if (!option.isLive) {
|
||||||
time({
|
this.add(
|
||||||
name: 'time',
|
time({
|
||||||
disable: option.isLive,
|
name: 'time',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
index: 30,
|
index: 30,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.quality.length) {
|
||||||
quality({
|
this.add(
|
||||||
name: 'quality',
|
quality({
|
||||||
disable: option.quality.length === 0,
|
name: 'quality',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 10,
|
index: 10,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.screenshot && !isMobile) {
|
||||||
screenshot({
|
this.add(
|
||||||
name: 'screenshot',
|
screenshot({
|
||||||
disable: !option.screenshot || isMobile,
|
name: 'screenshot',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 20,
|
index: 20,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.setting) {
|
||||||
setting({
|
this.add(
|
||||||
name: 'setting',
|
setting({
|
||||||
disable: !option.setting,
|
name: 'setting',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 30,
|
index: 30,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.pip) {
|
||||||
pip({
|
this.add(
|
||||||
name: 'pip',
|
pip({
|
||||||
disable: !option.pip,
|
name: 'pip',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 40,
|
index: 40,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.airplay && window.WebKitPlaybackTargetAvailabilityEvent) {
|
||||||
airplay({
|
this.add(
|
||||||
name: 'airplay',
|
airplay({
|
||||||
disable: !option.airplay || !window.WebKitPlaybackTargetAvailabilityEvent,
|
name: 'airplay',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 50,
|
index: 50,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.fullscreenWeb) {
|
||||||
fullscreenWeb({
|
this.add(
|
||||||
name: 'fullscreenWeb',
|
fullscreenWeb({
|
||||||
disable: !option.fullscreenWeb,
|
name: 'fullscreenWeb',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 60,
|
index: 60,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.add(
|
if (option.fullscreen) {
|
||||||
fullscreen({
|
this.add(
|
||||||
name: 'fullscreen',
|
fullscreen({
|
||||||
disable: !option.fullscreen,
|
name: 'fullscreen',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
index: 70,
|
index: 70,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
for (let index = 0; index < option.controls.length; index++) {
|
for (let index = 0; index < option.controls.length; index++) {
|
||||||
this.add(option.controls[index]);
|
this.add(option.controls[index]);
|
||||||
|
|||||||
Reference in new issue
Block a user