From 7e3d7a0e0eea89120fa6fc0efaa6f6217b59932a Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Mon, 22 Apr 2024 10:09:48 +0200 Subject: [PATCH] [mirotalksfu] - add check isFullScreenSupported --- public/js/RoomClient.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 60c48dce..6eac24aa 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -221,7 +221,7 @@ class RoomClient { this._isConnected = false; this.isVideoOnFullScreen = false; - this.isVideoFullScreenSupported = peer_info.is_mobile_device && peer_info.os_name === 'iOS' ? false : true; + this.isVideoFullScreenSupported = this.isFullScreenSupported(); this.isVideoPictureInPictureSupported = document.pictureInPictureEnabled; this.isZoomCenterMode = false; this.isChatOpen = false; @@ -3047,6 +3047,15 @@ class RoomClient { // FULL SCREEN // #################################################### + isFullScreenSupported() { + return ( + document.fullscreenEnabled || + document.webkitFullscreenEnabled || + document.mozFullScreenEnabled || + document.msFullscreenEnabled + ); + } + toggleFullScreen(elem = null) { let el = elem ? elem : document.documentElement; document.fullscreenEnabled =