Skip to content

Commit

Permalink
fix: Allow show subtitles using webkit Fullscreen API when playing na…
Browse files Browse the repository at this point in the history
…tive HLS (#7539)
  • Loading branch information
avelad authored Nov 5, 2024
1 parent abfc0b2 commit 6ab6a8f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2985,6 +2985,17 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
'webkitcurrentplaybacktargetiswirelesschanged',
() => setHiddenMode());
}
const video = /** @type {HTMLVideoElement} */(mediaElement);
if (video.webkitSupportsFullscreen) {
this.loadEventManager_.listen(video, 'webkitpresentationmodechanged',
() => {
if (video.webkitPresentationMode != 'inline') {
setShowingMode();
} else {
setHiddenMode();
}
});
}
}
// Add all media element listeners.
this.addBasicMediaListeners_(mediaElement, startTimeOfLoad);
Expand Down

0 comments on commit 6ab6a8f

Please sign in to comment.