This commit is contained in:
zhw2590582 committed 2022-03-16 22:49:04 +08:00
1 parent 3b365b7933
commit c0321f660c
17 files changed
+26 -26

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ export default class Contextmenu extends Component {
this.name = 'contextmenu';
this.$parent = art.template.$contextmenu;
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
if (!isMobile) {
this.init();
}
+2 -2
View File
@@ -1,4 +1,4 @@
import { errorHandle, addClass, removeClass, isMobile } from '../utils';
import { errorHandle, addClass, removeClass } from '../utils';
import Component from '../utils/component';
import fullscreen from './fullscreen';
import fullscreenWeb from './fullscreenWeb';
@@ -42,7 +42,7 @@ export default class Control extends Component {
}
});
art.once(isMobile ? 'video:loadedmetadata' : 'ready', () => {
art.once('video:loadedmetadata', () => {
this.add(
progress({
name: 'progress',
+1 -1
View File
@@ -14,7 +14,7 @@ export default class Events {
this.loadImg = this.loadImg.bind(this);
if (art.whitelist.state) {
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
clickInit(art, this);
hoverInit(art, this);
mousemoveInit(art, this);
+1 -1
View File
@@ -5,7 +5,7 @@ export default class Hotkey {
this.art = art;
this.keys = {};
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
if (art.option.hotkey && !isMobile) {
this.init();
}
+1 -1
View File
@@ -5,7 +5,7 @@ export default class Info extends Component {
constructor(art) {
super(art);
this.name = 'info';
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
if (!isMobile) {
this.init();
}
+1 -1
View File
@@ -12,7 +12,7 @@ export default class Layer extends Component {
this.name = 'layer';
this.$parent = $layer;
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
for (let index = 0; index < option.layers.length; index++) {
this.add(option.layers[index]);
}
@@ -68,7 +68,7 @@ export default function fullscreenMix(art) {
template: { $video },
} = art;
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
if (screenfull.isEnabled) {
nativeScreenfull(art);
} else if (document.fullscreenEnabled || $video.webkitSupportsFullscreen) {
+1 -1
View File
@@ -36,7 +36,7 @@ export default class Setting extends Component {
this.cache = new Map();
if (option.setting) {
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
if (option.playbackRate) {
this.option.push(playbackRate(art));
}
+1 -1
View File
@@ -9,7 +9,7 @@ export default class Subtitle extends Component {
this.name = 'subtitle';
art.once('ready', () => {
art.once('video:loadedmetadata', () => {
this.init(art.option.subtitle);
});
}