From ca3757ee75c4ea5a65160e79dec2e91893c00869 Mon Sep 17 00:00:00 2001 From: steveseguin Date: Wed, 3 Sep 2025 10:34:53 -0400 Subject: [PATCH] css improvements --- fonts.html | 562 ++++++++++++++++++++++++++++++++++++++++++++++++++ index.html | 6 +- lib.js | 6 + main.css | 5 - main.js | 15 +- supports.html | 431 +++++++++++++++++++++++++++----------- 6 files changed, 895 insertions(+), 130 deletions(-) create mode 100644 fonts.html diff --git a/fonts.html b/fonts.html new file mode 100644 index 0000000..630b9eb --- /dev/null +++ b/fonts.html @@ -0,0 +1,562 @@ + + + + + + Installed Font Detector — Preview installed fonts and generate ?font links + + + + + + + + + + + + + + + + + + + + + + +
+
+

Installed Font Detector

+

Lists fonts your browser can use, shows a live sample, and provides a URL parameter to apply the font site‑wide.

+
+ +
+ + + +
Detecting…
+
+ +
+ + +
+ + + + diff --git a/index.html b/index.html index 680fe6f..208d4b8 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@ - + @@ -3116,8 +3116,8 @@ } - - + + diff --git a/lib.js b/lib.js index 609205d..e25f567 100644 --- a/lib.js +++ b/lib.js @@ -35836,6 +35836,9 @@ function updateDirectorsVideo(data, UUID) { input.max = 5; input.min = 0.2; input.step = 0.00001; + } else if (i === "exposureTime") { + input.min = data.cameraConstraints[i].min; + input.max = Math.min(data.cameraConstraints[i].max, 2000); } else { input.min = data.cameraConstraints[i].min; input.max = data.cameraConstraints[i].max; @@ -37255,6 +37258,9 @@ function listCameraSettings() { if (i === "aspectRatio") { input.max = 5; input.min = 0.2; + } else if (i === "exposureTime") { + input.min = parseFloat(session.cameraConstraints[i].min); + input.max = Math.min(parseFloat(session.cameraConstraints[i].max), 2000); } else { input.min = parseFloat(session.cameraConstraints[i].min); input.max = parseFloat(session.cameraConstraints[i].max); diff --git a/main.css b/main.css index 35bb99a..e2a1220 100644 --- a/main.css +++ b/main.css @@ -6843,9 +6843,6 @@ textarea::placeholder { .darktheme :-moz-placeholder { color: var(--muted-icon, #c8ccd4) !important; } -/* Light theme icon subtlety */ -.column.card .las { color: #5b6574; } - /* 13) High-contrast treatment for copy links (reshare) */ /* The anchor element itself carries .grabLinks; ensure we target it directly */ a.grabLinks:link, @@ -6914,8 +6911,6 @@ ul#audioSource3 input:checked + label { /* Controls grid buttons: consistent shape & hover */ .controlsGrid button { - border-radius: 8px; - padding: 6px 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform .08s ease, box-shadow .15s ease, filter .15s ease; } diff --git a/main.js b/main.js index 841209f..56cbcc6 100644 --- a/main.js +++ b/main.js @@ -76,7 +76,7 @@ async function main() { } } - if (location.hostname !== "vdo.ninja" && location.hostname !== "backup.vdo.ninja" && location.hostname !== "proxy.vdo.ninja" && location.hostname !== "obs.ninja") { + if (location.hostname !== "vdo.ninja" && location.hostname !== "backup.vdo.ninja" && location.hostname !== "proxy.vdo.ninja" && location.hostname !== "alt.vdo.ninja" && location.hostname !== "obs.ninja") { errorReport = false; if (location.hostname === "rtc.ninja") { @@ -108,8 +108,15 @@ async function main() { } try { if (ln_template === false) { - changeLg("blank"); + if (location.hostname === "china.vdo.ninja"){ + changeLg("cn"); + } else { + changeLg("blank"); + } } + if (location.hostname === "china.vdo.ninja"){ + session.wss = "wss://china.rtc.ninja:8443"; + } //getById("mainmenu").style.opacity = 1; getById("qos").innerHTML = ''; @@ -128,6 +135,10 @@ async function main() { } else { // check if automatic language translation is available getById("mainmenu").style.opacity = 1; + + if (location.hostname === "alt.vdo.ninja"){ + session.wss = "wss://china.rtc.ninja:8443"; + } } //// translation stuff ends //// diff --git a/supports.html b/supports.html index 8c36914..6da04c6 100644 --- a/supports.html +++ b/supports.html @@ -1,11 +1,93 @@ - - - - - - - + + + + + + + + + -
-

Device to check

- -
+
+

Device to check

+
+ + + +
+
+ + +
+ +
+ PTZ permission: checking… + +
+

📹 Camera supported options

@@ -36,12 +133,12 @@
- + var supports = navigator.mediaDevices.getSupportedConstraints(); + prettyPrintJsonToId(supports, "browserSupportedOptions"); + document.getElementById("browserSupportedOptionsTitle").innerText += " (" + Object.keys(supports).length + ")"; + + async function unlockDevices(){ + try{ + // Minimal stream to unlock device labels on iOS and Firefox + const tmp = await navigator.mediaDevices.getUserMedia({ video: true, audio: false }); + // stop immediately; we only need permission + tmp.getTracks().forEach(t=>t.stop()); + refreshDevices(); + } catch(e){ + console.warn("Camera permission denied:", e && e.name); + refreshDevices(); // still try to enumerate what we can + } + } + + function refreshDevices(){ + navigator.mediaDevices.enumerateDevices().then(function(devices){ + var sel = document.getElementById("cameraSelector"); + var prev = sel.value; + sel.innerHTML = ""; + var countVideoInputs = 0; + devices.forEach(function(device){ + if (device.kind === "videoinput"){ + countVideoInputs++; + var element = document.createElement("option"); + element.value = device.deviceId; + element.textContent = device.label || (countVideoInputs===1?"Default Camera":"Camera "+countVideoInputs); + sel.appendChild(element); + } + }); + // Show iOS hint and facing controls if needed + document.getElementById("iosHint").style.display = (isIOS() || countVideoInputs <= 1) ? "block" : "none"; + document.getElementById("facingModeControls").style.display = (isIOS() || countVideoInputs <= 1) ? "block" : "none"; + // Restore selection if possible + if ([...sel.options].some(o=>o.value===prev)) sel.value = prev; + // Auto trigger first option + if (sel.options.length){ changeCamera(); } + }).catch(function (err){ + console.log(err && (err.name+": "+err.message)); + }); + } + + function onDeviceChange(){ refreshDevices(); } + if (navigator.mediaDevices && "ondevicechange" in navigator.mediaDevices){ + navigator.mediaDevices.addEventListener("devicechange", onDeviceChange); + } + + async function updatePTZStatus(){ + var el = document.getElementById("ptzStatus"); + if (!(navigator.permissions && navigator.permissions.query)){ + el.innerText = "unknown"; + return; + } + try{ + var status = await navigator.permissions.query({ name: "camera", panTiltZoom: true }); + el.innerText = status.state || "unknown"; + status.onchange = function(){ el.innerText = status.state || "unknown"; }; + } catch(e){ + el.innerText = "not supported"; + } + } + + async function requestPTZ(){ + try{ + const deviceId = document.getElementById("cameraSelector").value || undefined; + const constraints = { video: { pan: true, tilt: true, zoom: true } }; + if (deviceId){ constraints.video.deviceId = { exact: deviceId }; } + const tmp = await navigator.mediaDevices.getUserMedia(constraints); + tmp.getTracks().forEach(t=>t.stop()); + } catch(e){ + console.warn("PTZ request failed:", e && e.name); + } finally { + updatePTZStatus(); + } + } + + // Initial population without permission; user can tap Unlock to improve labels + refreshDevices(); + updatePTZStatus(); +