mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-30 19:53:21 +05:30
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
577e6e6d7f |
@@ -615,6 +615,12 @@ function update_captions() {
|
||||
}
|
||||
|
||||
function toggle_fullscreen() {
|
||||
// if fullscreen is handled by the browser
|
||||
if (document.fullscreenElement === document.querySelector('#player_html5_api')) {
|
||||
document.exitFullscreen();
|
||||
return;
|
||||
}
|
||||
// otherwise handle by videojs
|
||||
player.isFullscreen() ? player.exitFullscreen() : player.requestFullscreen();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user