Update share_btn.py
Browse files- share_btn.py +4 -4
share_btn.py
CHANGED
|
@@ -23,12 +23,12 @@ share_js = """async () => {
|
|
| 23 |
return url;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
async function getOutputVideoFile(videoEL){
|
| 27 |
|
| 28 |
const res = await fetch(videoEL.src, { mode: 'no-cors'});
|
| 29 |
const blob = await res.blob();
|
| 30 |
-
const videoId = Date.now() % 200;
|
| 31 |
-
const fileName = `talking-portrait-${{
|
| 32 |
const videoBlob = new File([blob], fileName, { type: 'video/mp4' });
|
| 33 |
|
| 34 |
console.log(videoBlob);
|
|
@@ -63,7 +63,7 @@ share_js = """async () => {
|
|
| 63 |
shareIconEl.style.display = 'none';
|
| 64 |
loadingIconEl.style.removeProperty('display');
|
| 65 |
|
| 66 |
-
const videoFile = await getOutputVideoFile(outputVideo);
|
| 67 |
const dataOutputVideo = await uploadFile(videoFile);
|
| 68 |
|
| 69 |
|
|
|
|
| 23 |
return url;
|
| 24 |
}
|
| 25 |
|
| 26 |
+
async function getOutputVideoFile(videoEL, videoName){
|
| 27 |
|
| 28 |
const res = await fetch(videoEL.src, { mode: 'no-cors'});
|
| 29 |
const blob = await res.blob();
|
| 30 |
+
//const videoId = Date.now() % 200;
|
| 31 |
+
const fileName = `talking-portrait-${{videoName}}.mp4`;
|
| 32 |
const videoBlob = new File([blob], fileName, { type: 'video/mp4' });
|
| 33 |
|
| 34 |
console.log(videoBlob);
|
|
|
|
| 63 |
shareIconEl.style.display = 'none';
|
| 64 |
loadingIconEl.style.removeProperty('display');
|
| 65 |
|
| 66 |
+
const videoFile = await getOutputVideoFile(outputVideo, outputVideo_name);
|
| 67 |
const dataOutputVideo = await uploadFile(videoFile);
|
| 68 |
|
| 69 |
|