fffiloni commited on
Commit
d96a59a
·
1 Parent(s): d07778c

Update share_btn.py

Browse files
Files changed (1) hide show
  1. 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-${{videoId}}.mp4`;
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