Try initializing UI again

This commit is contained in:
Tamius Han 2021-08-26 01:07:39 +02:00
parent 1b829e095b
commit 84de5927cd
2 changed files with 8 additions and 3 deletions

View File

@ -41,10 +41,10 @@
import KeyboardShortcutParser from '../../common/js/KeyboardShortcutParser';
import ShortcutButton from '../../common/components/ShortcutButton';
import ComputeActionsMixin from '../../common/mixins/ComputeActionsMixin';
import CropModePersistence from '../../common/enums/crop-mode-persistence.enum';
import ExecAction from '../ui-libs/ExecAction';
import BrowserDetect from '../../ext/conf/BrowserDetect';
import AspectRatio from '../../common/enums/aspect-ratio.enum';
import AspectRatioType from '../../common/enums/AspectRatioType.enum';
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
export default {
data() {
@ -99,7 +99,7 @@ export default {
// );
},
testAction() {
window.ultrawidify.videos[0].setAr({type: AspectRatio.FitWidth});
window.ultrawidify.videos[0].setAr({type: AspectRatioType.FitWidth});
}
}
}

View File

@ -66,6 +66,8 @@ class PlayerData {
dimensions: {width?: number, height?: number, fullscreen?: boolean};
private playerIdElement: any;
private observer: ResizeObserver;
private ui: any;
//#endregion
/**
@ -95,6 +97,8 @@ class PlayerData {
this.element = this.getPlayer();
this.notificationService = new PlayerNotificationUi(this.element, this.settings);
this.ui = new PlayerUi(this.element, this.settings);
this.ui.init();
this.dimensions = undefined;
this.overlayNode = undefined;
@ -121,6 +125,7 @@ class PlayerData {
console.error('[Ultrawidify::PlayerData::ctor] There was an error setting up player data. You should be never seeing this message. Error:', e);
this.invalid = true;
}
}
/**