mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 15:02:19 +00:00
Fix player width
This commit is contained in:
parent
e1a0897cc4
commit
55245208b4
@ -2,6 +2,7 @@
|
||||
video {
|
||||
display: block;
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
|
||||
/* Black borders around video */
|
||||
background-color: #000;
|
||||
|
@ -76,7 +76,7 @@ startPeerConnection = () => {
|
||||
|
||||
// Register keyboard events
|
||||
let viewer = document.getElementById("viewer")
|
||||
window.onkeydown = (event) => {
|
||||
window.addEventListener("keydown", (event) => {
|
||||
switch (event.key) {
|
||||
case 'f':
|
||||
// F key put player in fullscreen
|
||||
@ -90,16 +90,8 @@ window.onkeydown = (event) => {
|
||||
case ' ':
|
||||
// M and space key mute player
|
||||
viewer.muted = !viewer.muted
|
||||
event.preventDefault()
|
||||
viewer.play()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// On click, mute and demute
|
||||
viewer.addEventListener("play", (event) => {
|
||||
event.preventDefault()
|
||||
viewer.muted = !viewer.muted
|
||||
})
|
||||
viewer.addEventListener("pause", (event) => {
|
||||
event.preventDefault()
|
||||
viewer.muted = !viewer.muted
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user