From 54886569b18e5c4c88664935968df9c679d39393 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Mon, 23 Dec 2024 12:57:10 +0100 Subject: [PATCH] fix(PresenterOverlay): limit overlay to video_promoted wrapper borders Signed-off-by: Maksim Sukharev --- src/components/CallView/CallView.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/CallView/CallView.vue b/src/components/CallView/CallView.vue index 8a8ed51db0d2..901c3ebee502 100644 --- a/src/components/CallView/CallView.vue +++ b/src/components/CallView/CallView.vue @@ -17,6 +17,7 @@
@@ -73,6 +74,7 @@ @force-promote-video="forcePromotedModel = $event" /> {}, forcePromotedModel: null, + resizeObserver: null, + promotedWrapperDimensions: null, } }, @@ -495,6 +499,9 @@ export default { subscribe('switch-screen-to-id', this._switchScreenToId) subscribe('set-background-blurred', this.setBackgroundBlurred) + + this.resizeObserver = new ResizeObserver(this.updatePromotedWrapperDimensions) + this.resizeObserver.observe(this.$refs.videoPromotedWrapper) }, beforeDestroy() { @@ -506,6 +513,10 @@ export default { unsubscribe('switch-screen-to-id', this._switchScreenToId) unsubscribe('set-background-blurred', this.setBackgroundBlurred) + + if (this.resizeObserver) { + this.resizeObserver.disconnect() + } }, methods: { @@ -800,6 +811,9 @@ export default { } }, + updatePromotedWrapperDimensions([entry]) { + this.promotedWrapperDimensions = `${entry.contentRect.width}:${entry.contentRect.height}` + }, }, }