1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-02-06 18:23:00 +00:00
ghostream/web/static/js/videoQuality.js
2020-10-06 09:12:19 +02:00

10 lines
375 B
JavaScript

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)
})