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="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="mpegts">MPEG-TS (slow, consumes server resources)</option>
</select> </select>
<a id="DownloadLink" href="" style="display:none">Right click here and Save Link As to Download</a>
</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" />
@ -123,7 +124,6 @@
</ul> </ul>
</div> </div>
</div> </div>
<iframe id="outputFile" style="display:none;"></iframe>
<script src="/thrimbletrimmer/scripts/playerSetup.js"></script> <script src="/thrimbletrimmer/scripts/playerSetup.js"></script>
<script src="/thrimbletrimmer/scripts/keyboardShortcuts.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", allow_holes: (isEditor) ? String(document.getElementById('AllowHoles').checked) : "true",
}); });
console.log(targetURL); console.log(targetURL);
document.getElementById('outputFile').src = targetURL; document.getElementById('DownloadLink').href = targetURL;
document.getElementById('DownloadLink').style.display = "";
}; };
thrimbletrimmerManualLink = function() { thrimbletrimmerManualLink = function() {

Loading…
Cancel
Save