1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 15:02:19 +00:00

Fix full screen mode

This commit is contained in:
Yohann D'ANELLO 2020-11-09 16:53:35 +01:00
parent 28ef6a5526
commit cfcde6f530

View File

@ -88,17 +88,17 @@ export function initViewerPage(stream, viewersCounterRefreshPeriod, posterUrl) {
case "f": case "f":
// F key put player in fullscreen // F key put player in fullscreen
if (document.fullscreenElement !== null) { if (document.fullscreenElement !== null) {
document.exitFullscreen(); document.exitFullscreen()
} else { } else {
player.requestFullscreen(); document.getElementsByTagName("video")[0].requestFullscreen()
} }
break; break;
case "m": case "m":
case " ": case " ":
// M and space key mute player // M and space key mute player
player.setMute(!player.getMute()); player.setMute(!player.getMute())
event.preventDefault(); event.preventDefault()
player.play(); player.play()
break; break;
} }
}); });