mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 23:52:16 +02:00
Change the quality selector
This commit is contained in:
@ -44,6 +44,19 @@ h1, h2, h3, h4 {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
select {
|
||||
border: none;
|
||||
color: inherit;
|
||||
appearance: none;
|
||||
|
||||
/* Custom caret */
|
||||
background-color: transparent;
|
||||
background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(187, 187, 187)' height='24' viewBox='0 1 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
|
||||
background-repeat: no-repeat;
|
||||
background-position-x: 100%;
|
||||
padding-right: 1.2rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
@ -1,8 +1,9 @@
|
||||
document.getElementsByName("quality").forEach(function (elem) {
|
||||
elem.onclick = function () {
|
||||
// Restart the connection with a new quality
|
||||
peerConnection.createOffer({"iceRestart": true}).then(offer => {
|
||||
return peerConnection.setLocalDescription(offer)
|
||||
}).catch(console.log)
|
||||
}
|
||||
document.getElementById("quality").addEventListener("change", (event) => {
|
||||
console.log(`Stream quality changed to ${event.target.value}`)
|
||||
|
||||
// Restart the connection with a new quality
|
||||
// FIXME: set quality
|
||||
peerConnection.createOffer({ "iceRestart": true }).then(offer => {
|
||||
return peerConnection.setLocalDescription(offer)
|
||||
}).catch(console.log)
|
||||
})
|
||||
|
Reference in New Issue
Block a user