diff --git a/trailer.html b/trailer.html index c24fbbd..295c89e 100644 --- a/trailer.html +++ b/trailer.html @@ -379,6 +379,58 @@ + (worst && over > 5 ? "" : "") + ""; } + // A cut is an ordering, not a render. Playing one is free, so all of them + // can be looked at before anything is joined into a file. + function cutsHtml(meta) { + if (meta.writer !== RUN.lead_writer) return ""; + var shots = PKG.shots || []; + var filmed = shots.filter(function (s) { return s.clip_url; }).length; + var cuts = PKG.cuts || []; + var st = String(PKG.cuts_state || ""); + var out = '

Shorter cuts of this same shoot

' + + '

Nothing here is re-filmed. A cut is an order to play ' + + 'the shots in, so making another one costs nothing — which is why ' + + 'the question is not “what is the right length” but “which ' + + 'version do people watch to the end”.

'; + + if (st === "thinking") out += '

Working out what to drop…

'; + else if (/^failed/.test(st)) out += '

' + esc(st) + '

'; + + out += cuts.map(function (c) { + var stat = STATS[c.id]; + var play = (PLAYING === c.id) + ? '
' + + '
loading…' + + '
' + : ''; + var tools = ''; + if (c.state === "made" && c.video_url) + tools += 'Published · in My videos'; + else if (c.state === "making") + tools += 'joining…'; + else if (filmed) + tools += ''; + + return '
' + esc(c.name || "") + '' + + '' + mmss(c.seconds || 0) + ' · ' + + (c.shot_ids || []).length + ' shots' + + (c.strategy ? '

' + esc(c.strategy) + '

' : '') + + (c.why ? '

' + esc(c.why) + '

' : '') + + (c.sacrifices ? '

gives up: ' + esc(c.sacrifices) + '

' : '') + + (stat ? '

' + stat.views + ' viewer' + + (stat.views === 1 ? '' : 's') + ' · median ' + stat.median_percent + + '% watched · ' + stat.completion_rate + '% reached the end

' : '') + + '

' + esc((c.shot_ids || []).join(" ")) + '

' + + '
' + tools + '
' + play + '
'; + }).join(""); + + if (!cuts.length && st !== "thinking") + out += '

No cuts proposed yet.

'; + return out + '
'; + } + function reviewsHtml(meta) { var mine = REVIEWS.filter(function (r) { return r.subject === meta.writer && Number(r.iteration) === Number(meta.iteration); }); @@ -465,7 +517,7 @@ shots.forEach(function (s) { body += shotHtml(s, voice) + insertHtml(s.id); }); return head + probs + '
' + barHtml(meta) + '
' - + spineHtml() + reviewsHtml(meta) + castHtml + body; + + spineHtml() + cutsHtml(meta) + reviewsHtml(meta) + castHtml + body; } function insertHtml(after) {