diff --git a/src/csui/PlayerUiComponent.vue b/src/csui/PlayerUiComponent.vue index b1bf3f7..c03fab3 100644 --- a/src/csui/PlayerUiComponent.vue +++ b/src/csui/PlayerUiComponent.vue @@ -2,8 +2,74 @@
TEST CONTENT -
- {{debugData}} +
+ + +
+

Player info

+

+ Window size:
+ {{windowWidth}} x {{windowHeight}} +

+

+ Player dimensions
+ {{debugData?.resizer?.playerData?.dimensions?.width ?? 'not detected'}} x {{debugData?.resizer?.playerData?.dimensions?.height ?? 'not detected'}} +

+

+ Player id: {{debugData?.resizer?.playerData?.elementId || ''}} +

+

+ Player classes:
+ {{debugData?.resizer?.playerData?.classList || ''}} +

+

+ Is full screen? {{debugData?.resizer?.playerData?.dimensions?.fullscreen ?? 'unknown'}} +

+ +
+ + +
+

Stream info

+

+ Stream dimensions: (Native size of the video)
+ {{debugData?.resizer?.videoRawData?.streamDimensions.x}} x {{debugData?.resizer?.videoRawData?.streamDimensions?.y}} +

+

+ Stream displayed dimensions: (Video file is being upscaled to this size)
+ {{debugData?.resizer?.videoRawData?.displayedSize?.x}} x {{debugData?.resizer?.videoRawData?.displayedSize?.y}} +

+

+ Video element size: (Size of the html element)
+ {{debugData?.resizer?.videoRawData?.displayedSize?.x}} x {{debugData?.resizer?.videoRawData?.displayedSize?.y}} +

+

+ Size difference to player (raw): (positive numbers: video element is bigger than player element)
+ x: {{debugData?.resizer?.sizeDifferenceToPlayer?.beforeZoom?.wdiff}};     y: {{debugData?.resizer?.sizeDifferenceToPlayer?.beforeZoom?.hdiff}} +

+

+ Size difference to player (raw): (same as above, except after cropping, stretching, panning and zoom are applied)
+ x: {{debugData?.resizer?.sizeDifferenceToPlayer?.afterZoom?.wdiff}};     y: {{debugData?.resizer?.sizeDifferenceToPlayer?.afterZoom?.hdiff}} +

+
+ + +
+

Transformations

+

+ Alignment: (I agree that 'left' and 'right' are both evil, but that's not the kind of alignments we're thinking of)
+ {{debugData?.resizer?.videoTranslation?.alignment || ''}} +

+

+ Translation
+ x: {{debugData?.resizer?.videoTranslation?.x}};     y: {{debugData?.resizer?.videoTranslation?.y}} +

+
+
+
+
+        {{debugDataPrettified}}
+      
@@ -22,7 +88,8 @@ export default { debugData: { resizer: {}, player: {}, - } + }, + debugDataPrettified: '' }; }, computed: { @@ -31,6 +98,12 @@ export default { 'resizerDebugData', 'playerDebugData' ]), + windowWidth: () => { + return window.innerWidth; + }, + windowHeight: () => { + return window.innerHeight; + }, }, watch: { showUi(visible) { @@ -40,9 +113,11 @@ export default { }, resizerDebugData(newData) { this.debugData.resizer = newData; + this.debugDataPrettified = JSON.stringify(this.debugData, null, 2); }, playerDebugData(newData) { this.debugData.player = newData; + this.debugDataPrettified = JSON.stringify(this.debugData, null, 2); } }, created() { @@ -54,7 +129,7 @@ export default { } - +