thrimbletrimmer: Add option to select cut type for Download button

In most cases, you want "rough" because you're going to trim the resulting
video later anyway.
pull/139/head
Mike Lang 5 years ago
parent eb4fb5a9e1
commit 58d09b419c

@ -101,6 +101,14 @@
<a id="ResetButton" href="JavaScript:thrimbletrimmerResetLink();">Reset Edits</a> <a id="ResetButton" href="JavaScript:thrimbletrimmerResetLink();">Reset Edits</a>
<a id="HelpButton" style="float:right;" href="JavaScript:toggleHiddenPane('HelpPane');">Help</a> <a id="HelpButton" style="float:right;" href="JavaScript:toggleHiddenPane('HelpPane');">Help</a>
<a id="UltrawideButton" style="float:right;margin-right:10px;" href="JavaScript:toggleUltrawide();">Ultrawide</a> <a id="UltrawideButton" style="float:right;margin-right:10px;" href="JavaScript:toggleUltrawide();">Ultrawide</a>
<br/>
Download type:
<select id="DownloadType">
<option value="rough" selected>Rough (fastest, pads start and end by a few seconds)</option>
<option value="fast">Fast (may have artifacts a few seconds in from start and end)</option>
<option value="mpegts">MPEG-TS (slow, consumes server resources)</option>
<option value="mp4">MP4 (slower, consumes server resources, output is MP4 file)</option>
</select>
</div> </div>
<div id="ManualLinkPane" style="display:none"> <div id="ManualLinkPane" style="display:none">
<input id="ManualLink" /> <input type="button" id="ManualButton" onclick="thrimbletrimmerManualLink()" value="Set Link" /> <input id="ManualLink" /> <input type="button" id="ManualButton" onclick="thrimbletrimmerManualLink()" value="Set Link" />

@ -274,6 +274,11 @@ thrimbletrimmerDownload = function(isEditor) {
"?" + buildQuery({ "?" + buildQuery({
start: range.start, start: range.start,
end: range.end, end: range.end,
// In non-editor, always use rough cut. They don't have the edit controls to do
// fine time selection anyway.
type: (isEditor) ? (
document.getElementById('DownloadType').options[document.getElementById('DownloadType').options.selectedIndex].value
) : "rough",
// Always allow holes in non-editor, accidentially including holes isn't important // Always allow holes in non-editor, accidentially including holes isn't important
allow_holes: (isEditor) ? String(document.getElementById('AllowHoles').checked) : "true", allow_holes: (isEditor) ? String(document.getElementById('AllowHoles').checked) : "true",
}); });

Loading…
Cancel
Save