From 141b7b776d042484bf5742f58a28d33c610ccb43 Mon Sep 17 00:00:00 2001 From: papico Date: Wed, 9 Nov 2022 22:56:30 +0900 Subject: [PATCH 1/2] fix: check isFullScreenSupported on onScreenRotation function --- ui/controls.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/controls.js b/ui/controls.js index 7e7184faa7..736b3edd58 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -1024,7 +1024,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget { if (!this.video_ || this.video_.readyState == 0 || this.castProxy_.isCasting() || - !this.config_.enableFullscreenOnRotation) { return; } + !this.config_.enableFullscreenOnRotation || + !this.isFullScreenSupported()) { return; } if (screen.orientation.type.includes('landscape') && !document.fullscreenElement) { From 1608151976928caaba4228e989ed5e87d45b0e62 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Wed, 9 Nov 2022 08:31:20 -0800 Subject: [PATCH 2/2] Fix linter --- ui/controls.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/controls.js b/ui/controls.js index 736b3edd58..db3f3222c0 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -1025,7 +1025,9 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget { this.video_.readyState == 0 || this.castProxy_.isCasting() || !this.config_.enableFullscreenOnRotation || - !this.isFullScreenSupported()) { return; } + !this.isFullScreenSupported()) { + return; + } if (screen.orientation.type.includes('landscape') && !document.fullscreenElement) {