mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-23 02:42:20 +00:00
9 lines
323 B
JavaScript
9 lines
323 B
JavaScript
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)
|
|
}
|
|
})
|