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:
parent
28ef6a5526
commit
cfcde6f530
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user