ghostream/web/static/js/videoQuality.js

10 lines
375 B
JavaScript
Raw Normal View History

2020-10-06 07:12:19 +00:00
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)
})