audio-player: made URL relitive to current location

This commit is contained in:
Trek H 2019-08-21 15:17:50 +09:30
parent cd25a287b4
commit 6bef4aeefc
1 changed files with 3 additions and 4 deletions

View File

@ -72,8 +72,7 @@ function load() {
document.getElementById('url').value = url; document.getElementById('url').value = url;
} }
if (url[0] == '/') { if (url[0] == '/') {
// url = window.location.protocol + '//' + window.location.host + url; url = window.location.protocol + '//' + window.location.host + url;
url = "http://vidgrind.appspot.com" + url
} }
if (url == "") { if (url == "") {
return; return;
@ -92,8 +91,8 @@ function load() {
var link = document.getElementById("link"); var link = document.getElementById("link");
link.href = dataURL; link.href = dataURL;
link.download = "audio.ts"; link.download = "media.ts";
link.innerHTML = "Download MPEG-TS"; link.innerHTML = "Download";
} else { } else {
console.log('There was a problem with the request.'); console.log('There was a problem with the request.');