diff --git a/web/static/css/style.css b/web/static/css/style.css index 869a7aa..1c276bd 100644 --- a/web/static/css/style.css +++ b/web/static/css/style.css @@ -44,6 +44,19 @@ h1, h2, h3, h4 { color: #ddd; } +select { + border: none; + color: inherit; + appearance: none; + + /* Custom caret */ + background-color: transparent; + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position-x: 100%; + padding-right: 1.2rem; +} + .container { height: 100%; width: 100%; diff --git a/web/static/js/videoQuality.js b/web/static/js/videoQuality.js index af4060f..1959b88 100644 --- a/web/static/js/videoQuality.js +++ b/web/static/js/videoQuality.js @@ -1,8 +1,9 @@ -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) - } +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) }) diff --git a/web/template/viewer.html b/web/template/viewer.html index d2f9bb1..683d41f 100644 --- a/web/template/viewer.html +++ b/web/template/viewer.html @@ -6,22 +6,19 @@ -
-
- - - - - - - - -
-
- - +

- + + + + + +