mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 04:32: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":
|
||||
// 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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user