Say when in the shot a line is spoken

This commit is contained in:
gator 2026-09-19 21:09:36 +00:00
parent 6a9264b539
commit b7e49db360

View file

@ -1193,9 +1193,14 @@
+ '<div class="say"><span class="who">' + esc(who.name || a.character_id) + '</span> ' + '<div class="say"><span class="who">' + esc(who.name || a.character_id) + '</span> '
+ (a.lip_sync ? '<span class="lip">on camera</span>' : '<span class="vobadge">voice over</span>') + (a.lip_sync ? '<span class="lip">on camera</span>' : '<span class="vobadge">voice over</span>')
+ '<br>' + esc(a.text || "") + '<br>' + esc(a.text || "")
+ ' <details style="display:inline"><summary style="cursor:pointer;color:var(--muted);font-size:12px;display:inline">change the words</summary>' + ' <details style="display:inline"><summary style="cursor:pointer;color:var(--muted);font-size:12px;display:inline">change the words or when they are said</summary>'
+ '<input type="text" maxlength="400" style="width:100%;margin:4px 0" data-linetext="' + esc(s.id) + '|' + ai + '" value="' + esc(a.text || "") + '">' + '<input type="text" maxlength="400" style="width:100%;margin:4px 0" data-linetext="' + esc(s.id) + '|' + ai + '" value="' + esc(a.text || "") + '">'
+ '<button type="button" class="btn" data-lineset="' + esc(s.id) + '|' + ai + '">Save these words</button></details>' + (a.lip_sync ? '<label style="display:block;font-size:12px;color:var(--muted);margin:2px 0 4px">Said '
+ '<select data-linewhen="' + esc(s.id) + '|' + ai + '">'
+ [["start", "at the start of the shot"], ["middle", "in the middle of the shot"], ["end", "at the end of the shot"]].map(function (o) {
return '<option value="' + o[0] + '"' + ((a.say_at || "middle") === o[0] ? ' selected' : '') + '>' + o[1] + '</option>'; }).join("")
+ '</select> — the rest of the shot plays in quiet around it.</label>' : '')
+ '<button type="button" class="btn" data-lineset="' + esc(s.id) + '|' + ai + '">Save</button></details>'
+ (a.delivery ? '<br><span class="dir">' + esc(a.delivery) + '</span>' : '') + (a.delivery ? '<br><span class="dir">' + esc(a.delivery) + '</span>' : '')
+ '</div><span class="dur" data-dur="' + esc(s.id) + '"></span></div>'; + '</div><span class="dur" data-dur="' + esc(s.id) + '"></span></div>';
}).join(""); }).join("");
@ -1528,7 +1533,9 @@
var lk = el.getAttribute("data-lineset"), lp = lk.split("|"); var lk = el.getAttribute("data-lineset"), lp = lk.split("|");
var lin = document.querySelector('[data-linetext="' + lk + '"]'); var lin = document.querySelector('[data-linetext="' + lk + '"]');
el.disabled = true; el.disabled = true;
r = await act("set_line", { draft_id: CUR, shot_id: lp[0], index: Number(lp[1]), text: lin ? lin.value : "" }); var lwh = document.querySelector('[data-linewhen="' + lk + '"]');
r = await act("set_line", { draft_id: CUR, shot_id: lp[0], index: Number(lp[1]), text: lin ? lin.value : "",
say_at: lwh ? lwh.value : "" });
if (r) { showMsg("msg", "Saved. The voice will be recorded again with the new words the next time it is played or filmed.", "ok"); await refresh(); } if (r) { showMsg("msg", "Saved. The voice will be recorded again with the new words the next time it is played or filmed.", "ok"); await refresh(); }
return; return;
} }