diff --git a/trailer.html b/trailer.html
index 4df48fd..4627b6f 100644
--- a/trailer.html
+++ b/trailer.html
@@ -322,7 +322,18 @@
if (!busy && timer) { clearInterval(timer); timer = null; }
}
+ // A refresh redraws the whole storyboard. While the author is watching a
+ // clip, or typing a note, or has the background box open, that redraw
+ // would stop the player and throw the typing away - so it waits.
+ function authorBusy() {
+ var vids = document.querySelectorAll("#pane video");
+ for (var i = 0; i < vids.length; i++) if (!vids[i].paused && !vids[i].ended) return true;
+ var a = document.activeElement;
+ if (a && a.closest && a.closest("#pane") && /^(TEXTAREA|INPUT)$/.test(a.tagName)) return true;
+ return !!(BGEDIT || EDITING);
+ }
async function refresh() {
+ if (authorBusy()) { tick(); return; }
var r = await api("run_status", { run_id: runId });
if (!r.ok) return;
RUN = r.run; DRAFTS = r.drafts || [];