mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-29 14:41:01 +02:00
Change the quality selector
This commit is contained in:
@ -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