From 06e43d4b450cf198495ce50baa881a714af11cf7 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Fri, 2 Sep 2022 13:54:17 +0200 Subject: [PATCH] [mirotalksfu] - improve video objectFit on pin --- public/js/RoomClient.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 81c52a5f..ac83d28b 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -1475,6 +1475,8 @@ class RoomClient { this.videoMediaContainer.style.left = 0; this.pinnedVideoPlayerId = null; this.isVideoPinned = false; + BtnVideoObjectFit.selectedIndex = 2; // cover + BtnVideoObjectFit.onchange(); } // #################################################### @@ -1898,6 +1900,8 @@ class RoomClient { this.videoPinMediaContainer.appendChild(cam); this.videoPinMediaContainer.style.display = 'block'; this.pinnedVideoPlayerId = elemId; + BtnVideoObjectFit.selectedIndex = 1; // contain + BtnVideoObjectFit.onchange(); setColor(btnPn, 'lime'); } else { if (this.pinnedVideoPlayerId != videoPlayer.id) { @@ -1917,6 +1921,8 @@ class RoomClient { this.videoMediaContainer.appendChild(cam); this.videoPinMediaContainer.style.display = 'none'; this.pinnedVideoPlayerId = null; + BtnVideoObjectFit.selectedIndex = 2; // cover + BtnVideoObjectFit.onchange(); setColor(btnPn, 'white'); } handleAspectRatio();