diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 7d2d3cf8..990e76c9 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -1483,6 +1483,21 @@ function doShortcut(e) { player.muted = !player.muted; break; } + case 'f': { + e.preventDefault(); + if (document.fullscreenElement === null) { + player.requestFullscreen().catch(e => { + console.error(e); + showModal('Unable to enter fullscreen', 3000); + }); + } else { + document.exitFullscreen().catch(e => { + console.error(e); + showModal('Unable to exit fullscreen', 3000); + }); + } + break; + } case 'ArrowLeft': { e.preventDefault(); showModal('- 5 seconds', 500); @@ -1527,6 +1542,7 @@ function doShortcut(e) {
Show help | ? |
Toggle mute | m | +
Toggle fullscreen | f |
Toggle subtitles (if available) | c |
Increase speed | > |
Decrease speed | < |