mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
remove art.once('video:loadedmetadata')
This commit is contained in:
1 parent
e225966202
commit
f160d8eb61
10 files changed
+372
-396
No files matched your search
@@ -31,7 +31,6 @@ export default class Setting extends Component {
|
||||
template: { $setting, $player },
|
||||
} = art;
|
||||
|
||||
this.art = art;
|
||||
this.name = 'setting';
|
||||
this.$parent = $setting;
|
||||
|
||||
@@ -40,31 +39,29 @@ export default class Setting extends Component {
|
||||
this.cache = new Map();
|
||||
|
||||
if (option.setting) {
|
||||
art.once('video:loadedmetadata', () => {
|
||||
if (option.playbackRate) {
|
||||
this.option.push(playbackRate(art));
|
||||
}
|
||||
if (option.playbackRate) {
|
||||
this.option.push(playbackRate(art));
|
||||
}
|
||||
|
||||
if (option.aspectRatio) {
|
||||
this.option.push(aspectRatio(art));
|
||||
}
|
||||
if (option.aspectRatio) {
|
||||
this.option.push(aspectRatio(art));
|
||||
}
|
||||
|
||||
if (option.flip) {
|
||||
this.option.push(flip(art));
|
||||
}
|
||||
if (option.flip) {
|
||||
this.option.push(flip(art));
|
||||
}
|
||||
|
||||
if (option.subtitleOffset) {
|
||||
this.option.push(subtitleOffset(art));
|
||||
}
|
||||
if (option.subtitleOffset) {
|
||||
this.option.push(subtitleOffset(art));
|
||||
}
|
||||
|
||||
for (let index = 0; index < option.settings.length; index++) {
|
||||
this.option.push(option.settings[index]);
|
||||
}
|
||||
for (let index = 0; index < option.settings.length; index++) {
|
||||
this.option.push(option.settings[index]);
|
||||
}
|
||||
|
||||
this.option = makeRecursion(this.option);
|
||||
this.option = makeRecursion(this.option);
|
||||
|
||||
this.init(this.option);
|
||||
});
|
||||
this.init(this.option);
|
||||
|
||||
art.on('blur', () => {
|
||||
if (this.show) {
|
||||
|
||||
Reference in new issue
Block a user