@@ -64,7 +64,7 @@
diff --git a/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue b/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue
index d41540f..ffc425f 100644
--- a/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue
+++ b/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue
@@ -68,84 +68,90 @@ import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
export default {
+ props: [
+ 'eventBus'
+ ],
data() {
return {
VideoAlignment: VideoAlignmentType
}
},
methods: {
- align() {
-
+ align(alignmentX, alignmentY) {
+ console.warn('sending set alignment:', {x: alignmentX, y: alignmentY});
+ this.eventBus.send('set-alignment', {x: alignmentX, y: alignmentY})
}
}
}
-
+
diff --git a/src/ext/lib/uwui/PlayerNotificationUI.js b/src/ext/lib/uwui/PlayerNotificationUI.js
index b4c13fa..29eed86 100644
--- a/src/ext/lib/uwui/PlayerNotificationUI.js
+++ b/src/ext/lib/uwui/PlayerNotificationUI.js
@@ -24,7 +24,7 @@ class PlayerNotificationUi extends UI {
PlayerNotificationUi.getStoreConfig(),
PlayerNotificationUi.getUiConfig(playerElement),
PlayerNotificationUi.getCommsConfig(),
- eventBus
+ { eventBus }
);
this.settings = settings;
diff --git a/src/ext/lib/uwui/PlayerUI.js b/src/ext/lib/uwui/PlayerUI.js
index 2e5b67d..b4c3c0c 100644
--- a/src/ext/lib/uwui/PlayerUI.js
+++ b/src/ext/lib/uwui/PlayerUI.js
@@ -20,13 +20,14 @@ class PlayerUi extends UI {
playerElement,
settings,
eventBus,
+ videoData
) {
super(
'ultrawidifyUi',
PlayerUi.getStoreConfig(),
PlayerUi.getUiConfig(playerElement),
PlayerUi.getCommsConfig(),
- eventBus
+ { eventBus, videoData }
);
this.settings = settings;
diff --git a/src/ext/lib/uwui/UI.js b/src/ext/lib/uwui/UI.js
index ce8b16b..e633be1 100644
--- a/src/ext/lib/uwui/UI.js
+++ b/src/ext/lib/uwui/UI.js
@@ -14,13 +14,13 @@ class UI {
storeConfig,
uiConfig, // {component, parentElement?}
commsConfig,
- eventBus
+ ultrawidify, // or, at least, videoData instance + event bus
) {
this.interfaceId = interfaceId;
this.commsConfig = commsConfig;
this.storeConfig = storeConfig;
this.uiConfig = uiConfig;
- this.eventBus = eventBus;
+ this.ultrawidify = ultrawidify;
this.init();
}
@@ -71,12 +71,12 @@ class UI {
app.mixin({
data() {
return {
- eventBus: options.eventBus
+ ultrawidify: options.ultrawidify
}
}
})
}
- }, {eventBus: this.eventBus});
+ }, {ultrawidify: this.ultrawidify});
if (this.vuexStore) {
app.use(this.vuexStore);
diff --git a/src/ext/lib/video-data/PlayerData.ts b/src/ext/lib/video-data/PlayerData.ts
index 252383b..c1f373e 100644
--- a/src/ext/lib/video-data/PlayerData.ts
+++ b/src/ext/lib/video-data/PlayerData.ts
@@ -95,7 +95,7 @@ class PlayerData {
this.element = this.getPlayer();
this.notificationService = new PlayerNotificationUi(this.element, this.settings, this.eventBus);
- this.ui = new PlayerUi(this.element, this.settings, this.eventBus);
+ this.ui = new PlayerUi(this.element, this.settings, this.eventBus, this.videoData);
this.ui.init();
this.dimensions = undefined;
diff --git a/src/ext/lib/video-transform/Resizer.ts b/src/ext/lib/video-transform/Resizer.ts
index 32aee44..ccd9f8f 100644
--- a/src/ext/lib/video-transform/Resizer.ts
+++ b/src/ext/lib/video-transform/Resizer.ts
@@ -591,6 +591,8 @@ class Resizer {
const {realVideoWidth, realVideoHeight, marginX, marginY} = this.computeVideoDisplayedDimensions();
+ const {postZoomVideoDimensions, displayedVideoDimensions, crop} = this.computeCroppedAreas(stretchFactors);
+
// correct any remaining element size discrepencies (applicable only to certain crop strategies!)
// NOTE: it's possible that we might also need to apply a similar measure for CropPillarbox strategy
// (but we'll wait for bug reports before doing so).
@@ -605,6 +607,9 @@ class Resizer {
stretchFactors.yFactor *= autoHeightCompensationFactor;
}
+ const offsetWidth = this.conf.video.offsetWidth;
+ const offsetHeight = this.conf.video.offsetHeight;
+
const wdiff = this.conf.player.dimensions.width - realVideoWidth;
const hdiff = this.conf.player.dimensions.height - realVideoHeight;