Play automatically when preparation finishes, and stop implying failure
"Prepare and play" only prepared. And a shot with no dialogue has no audio by design, so 13 of 20 spoken is not 7 failures - say how many are silent.
This commit is contained in:
parent
acfc51b2d9
commit
f3cfb15d51
1 changed files with 17 additions and 3 deletions
20
trailer.html
20
trailer.html
|
|
@ -162,6 +162,7 @@
|
|||
var RUN = null, DRAFTS = [], CUR = null, PKG = {}, NOTES = {}, REVIEWS = [];
|
||||
var timer = null, EDITING = null;
|
||||
var PLAYING = null, STATS = {}, QUEUE = [], QAT = 0;
|
||||
var REELWANT = false; // the author asked to play, not merely to prepare
|
||||
var runId = new URLSearchParams(location.search).get("run") || "";
|
||||
var audio = new Audio();
|
||||
|
||||
|
|
@ -490,8 +491,18 @@
|
|||
|
||||
if (running)
|
||||
out += '<p class="busy">Speaking every shot… ' + esc(st) + '</p>';
|
||||
else if (st === "ready") {
|
||||
var spoken = shots.filter(function (s) { return s.reel_url; }).length;
|
||||
var silent = shots.length - spoken;
|
||||
out += '<p class="lede">' + spoken + ' shots have dialogue and are spoken'
|
||||
+ (silent ? '; ' + silent + ' are silent and hold on the frame' : '')
|
||||
+ '.</p>';
|
||||
}
|
||||
else if (/^failed/.test(st))
|
||||
out += '<p class="cont">' + esc(st) + '</p>';
|
||||
else if (st)
|
||||
out += '<p class="cont">The last attempt stopped before it finished — '
|
||||
+ 'the server restarted under it. Ask again.</p>';
|
||||
|
||||
if (!REEL) {
|
||||
out += '<div class="tools" style="justify-content:center">'
|
||||
|
|
@ -880,12 +891,15 @@
|
|||
el.disabled = true;
|
||||
var rl = await api("reel", { draft_id: CUR });
|
||||
if (!rl.ok) { showMsg("msg", rl.error || "Could not load the storyboard."); return; }
|
||||
if (rl.ready < rl.of) {
|
||||
if (String(PKG.reel_state || "") !== "ready") {
|
||||
el.textContent = "Speaking every shot…";
|
||||
REELWANT = true;
|
||||
r = await act("prepare_reel", { draft_id: CUR });
|
||||
if (r) showMsg("msg", "Speaking " + r.shots + " shots. This is the same "
|
||||
+ "audio the film will use, so it is only paid for once.", "ok");
|
||||
setTimeout(refresh, 15000);
|
||||
+ "audio the film will use, so it is only paid for once. It starts "
|
||||
+ "playing on its own when it is ready.", "ok");
|
||||
else REELWANT = false;
|
||||
await refresh();
|
||||
return;
|
||||
}
|
||||
hideMsg("msg");
|
||||
|
|
|
|||
Loading…
Reference in a new issue