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