1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 02:42:20 +00:00
ghostream/web/static/js/videoQuality.js
2020-10-06 00:06:52 +02:00

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