From 3a4ecd0dda765f02d1af61cd4ea0569559be8b26 Mon Sep 17 00:00:00 2001 From: Yong <130093586+yonghuang28@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:04:59 -0400 Subject: [PATCH] &feedbackbutton tweak A small tweak for &feedbackbutton (1) The &feedbackbutton only accept value by &fb (e.g., &fb=50), but &feedbackbutton=50 won't work. With this patch, both way will work. (2) The button prompt info always show "Hear yourself at 50% volume" without dynamic showing the real user defined &fb or &feedbackbutton value. With this patch, the showing can sync with the user assigned value. --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index fe9feb2..57019d6 100644 --- a/main.js +++ b/main.js @@ -155,7 +155,12 @@ async function main() { if (urlParams.has("feedbackbutton") || urlParams.has("fb")) { getById("unmuteSelf").classList.remove("hidden"); // lets the director see the avatar option - session.selfVolume = urlParams.get("fb") || null; + //session.selfVolume = urlParams.get("fb") || null; + session.selfVolume = urlParams.get("feedbackbutton") || urlParams.get("fb") || null; + if (session.selfVolume){ + getById("unmuteSelf").setAttribute("title", `Hear yourself at ${parseFloat(session.selfVolume)}% volume`); + getById("unmuteSelf").setAttribute("alt", `Hear yourself at ${parseFloat(session.selfVolume)}% volume`); + } } if (urlParams.has("controls") || urlParams.has("videocontrols")) {