1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 10:22: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":
// F key put player in fullscreen
if (document.fullscreenElement !== null) {
document.exitFullscreen();
document.exitFullscreen()
} else {
player.requestFullscreen();
document.getElementsByTagName("video")[0].requestFullscreen()
}
break;
case "m":
case " ":
// M and space key mute player
player.setMute(!player.getMute());
event.preventDefault();
player.play();
player.setMute(!player.getMute())
event.preventDefault()
player.play()
break;
}
});