mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:03:36 -08:00
4.3.2
This commit is contained in:
1 parent
3b365b7933
commit
c0321f660c
17 files changed
+26
-26
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user