Solving nasty javascript bug avoiding download.
This commit is contained in:
parent
a85b8c8970
commit
7214bdffef
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user