thrimbletrimmer: Have a download link instead of a iframe

The iframe doesn't always work, this is more reliable.
pull/157/head
Mike Lang 5 years ago
parent c9f2e8e0a5
commit fd35c0dc20

@ -109,6 +109,7 @@
<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>
</select>
<a id="DownloadLink" href="" style="display:none">Right click here and Save Link As to Download</a>
</div>
<div id="ManualLinkPane" style="display:none">
<input id="ManualLink" /> <input type="button" id="ManualButton" onclick="thrimbletrimmerManualLink()" value="Set Link" />
@ -123,7 +124,6 @@
</ul>
</div>
</div>
<iframe id="outputFile" style="display:none;"></iframe>
<script src="/thrimbletrimmer/scripts/playerSetup.js"></script>
<script src="/thrimbletrimmer/scripts/keyboardShortcuts.js"></script>

@ -300,7 +300,8 @@ thrimbletrimmerDownload = function(isEditor) {
allow_holes: (isEditor) ? String(document.getElementById('AllowHoles').checked) : "true",
});
console.log(targetURL);
document.getElementById('outputFile').src = targetURL;
document.getElementById('DownloadLink').href = targetURL;
document.getElementById('DownloadLink').style.display = "";
};
thrimbletrimmerManualLink = function() {

Loading…
Cancel
Save