Spaces:
Runtime error
Runtime error
Update share_btn.py
Browse files- share_btn.py +3 -3
share_btn.py
CHANGED
|
@@ -23,7 +23,7 @@ share_js = """async () => {
|
|
| 23 |
return url;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
async function
|
| 27 |
const res = await fetch(videoEL.src);
|
| 28 |
const blob = await res.blob();
|
| 29 |
const videoId = Date.now() % 200;
|
|
@@ -49,9 +49,9 @@ share_js = """async () => {
|
|
| 49 |
shareIconEl.style.display = 'none';
|
| 50 |
loadingIconEl.style.removeProperty('display');
|
| 51 |
|
| 52 |
-
const inputFile = await
|
| 53 |
const urlInputVid = await uploadFile(inputFile);
|
| 54 |
-
const videoOutFile = await
|
| 55 |
const dataOutputVid = await uploadFile(videoOutFile);
|
| 56 |
|
| 57 |
const descriptionMd = `
|
|
|
|
| 23 |
return url;
|
| 24 |
}
|
| 25 |
|
| 26 |
+
async function getVideoBlobFile(videoEL){
|
| 27 |
const res = await fetch(videoEL.src);
|
| 28 |
const blob = await res.blob();
|
| 29 |
const videoId = Date.now() % 200;
|
|
|
|
| 49 |
shareIconEl.style.display = 'none';
|
| 50 |
loadingIconEl.style.removeProperty('display');
|
| 51 |
|
| 52 |
+
const inputFile = await getVideoBlobFile(inputVidEl);
|
| 53 |
const urlInputVid = await uploadFile(inputFile);
|
| 54 |
+
const videoOutFile = await getVideoBlobFile(outputVideo);
|
| 55 |
const dataOutputVid = await uploadFile(videoOutFile);
|
| 56 |
|
| 57 |
const descriptionMd = `
|