aboutsummaryrefslogtreecommitdiffstats
path: root/static/modules
diff options
context:
space:
mode:
Diffstat (limited to 'static/modules')
-rw-r--r--static/modules/obs.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/static/modules/obs.js b/static/modules/obs.js
index bcf237b..f7969b8 100644
--- a/static/modules/obs.js
+++ b/static/modules/obs.js
@@ -55,23 +55,20 @@ async function post(action, body = {}) {
}
// The dashboard's running slot: what is live, the scene and the elapsed
-// time, and a stop for it.
+// time. No stop here: a tap opens the OBS tab, so a stray touch cannot end a
+// recording.
export const busy = (st) => Boolean(st.connected && (st.recording || st.streaming));
export function slot(st, el) {
if (!el.firstChild) {
el.innerHTML = `<i class="nf sic rec"></i>
<span class="what"><span></span></span><span class="pct num"></span>
- <span class="meta"><span></span></span>
- <button class="act">Stop</button>`;
+ <span class="meta"><span></span></span>`;
}
const what = st.recording ? (st.paused ? "Recording paused" : "Recording") : "Streaming";
el.querySelector(".what > span").textContent = `${what} · ${st.currentScene ?? ""}`;
el.querySelector(".pct").textContent = st.recording ? clock(st.recordingTime) : "live";
- el.querySelector(".meta > span").textContent =
- [st.recording ? "recording" : null, st.streaming ? "streaming" : null].filter(Boolean).join(" + ");
- el.querySelector(".act").onclick = () =>
- post(st.recording ? "record" : "stream", { on: false });
+ el.querySelector(".meta > span").textContent = st.recording && st.streaming ? "and streaming" : "";
}
function bigButton(kind, name, label, on, times) {