Skip to content

Commit

Permalink
fix(UI): Suppress error log from fullscreen button on desktop (shaka-…
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Dec 13, 2022
1 parent 715035c commit 99da4ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/controls.js
Expand Up @@ -599,7 +599,11 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
if (this.config_.forceLandscapeOnFullscreen && screen.orientation) {
// Locking to 'landscape' should let it be either
// 'landscape-primary' or 'landscape-secondary' as appropriate.
await screen.orientation.lock('landscape');
// We ignore errors from this specific call, since it creates noise
// on desktop otherwise.
try {
await screen.orientation.lock('landscape');
} catch (error) {}
}
} else {
const video = /** @type {HTMLVideoElement} */(this.localVideo_);
Expand Down

0 comments on commit 99da4ce

Please sign in to comment.