Skip to content
Snippets Groups Projects
Commit 679fc14f authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
// ==UserScript==
// @name BBB Volume Slider
// @website https://code.fbi.h-da.de/istddmue2/bbb-volume-slider-userscript
// @version 0.1
// @description Adds a volume slider
// @author Daniel Müller
// @match https://*.h-da.de/html5client/join*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Check if the volume slider exists
if (document.getElementById("vs-container") != null) return;
// Create the container
let vsc = document.createElement("div")
vsc.id = "vs-container"
vsc.style.position = "absolute"
vsc.style.top = "20px"
vsc.style.right = "75px"
// Create the actual slider
let vs = document.createElement("input")
vs.type = "range"
vs.min = 1
vs.max = 100
vs.value = 100
vs.oninput = function() {
document.getElementById("remote-media").volume = Math.pow(this.value / 100.0, 2)
}
vsc.append(vs)
document.body.appendChild(vsc)
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment