diff --git a/lib/Peertube/DL/public/js/peertube-dl-web.js b/lib/Peertube/DL/public/js/peertube-dl-web.js index 2b85275..42b5dad 100644 --- a/lib/Peertube/DL/public/js/peertube-dl-web.js +++ b/lib/Peertube/DL/public/js/peertube-dl-web.js @@ -11,7 +11,7 @@ let downloadForm; let video; let modalLoading; let filename; -let url; +let url_video; let popingNotice; let popingNoticeContent; let closePopingNotice; @@ -70,7 +70,7 @@ function askForURL(url, format) { } else { video.src = response.url; filename = response.filename; - url = response.url; + url_video = response.url; video.addEventListener('canplay', (event) => { modalLoading.classList.remove('active'); modalVideoContainer.style.display = 'block'; @@ -103,7 +103,7 @@ function askForURL(url, format) { function downloadVideoPrepareHandler(event) { downloadVideoPrepare.classList.remove('active'); downloadVideoLoading.classList.add('active'); - generateBlobVideo(url).then( blob => { + generateBlobVideo(url_video).then( blob => { downloadVideo.href = URL.createObjectURL(blob); downloadVideo.download = filename; downloadVideoLoading.classList.remove('active');