1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-08-04 19:51:08 +02:00

Quality selector reload stream

This commit is contained in:
Alexandre Iooss
2020-10-06 09:20:25 +02:00
parent 24acfe1137
commit 392a9d7fc3
2 changed files with 7 additions and 6 deletions

View File

@@ -2,8 +2,8 @@ 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)
peerConnection.close()
peerConnection = null
streamPath = window.location.href + event.target.value
startPeerConnection()
})