fffiloni commited on
Commit
6378dbd
·
1 Parent(s): 53716df

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +4 -4
share_btn.py CHANGED
@@ -14,7 +14,7 @@ share_js = """async () => {
14
  const response = await fetch(UPLOAD_URL, {
15
  method: 'POST',
16
  headers: {
17
- 'Content-Type': 'video/mpeg',
18
  'X-Requested-With': 'XMLHttpRequest',
19
  },
20
  body: file, /// <- File inherits from Blob
@@ -23,13 +23,13 @@ share_js = """async () => {
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}`;
32
- const videoBlob = new File([blob], fileName, { type: 'video/mpeg' });
33
 
34
  console.log(videoBlob);
35
 
 
14
  const response = await fetch(UPLOAD_URL, {
15
  method: 'POST',
16
  headers: {
17
+ 'Content-Type': 'video/mp4',
18
  'X-Requested-With': 'XMLHttpRequest',
19
  },
20
  body: file, /// <- File inherits from Blob
 
23
  return url;
24
  }
25
 
26
+ async function getOutputVideoFile(videoURL, videoName){
27
 
28
+ const res = await fetch(videoURL, { mode: 'no-cors'});
29
  const blob = await res.blob();
30
  //const videoId = Date.now() % 200;
31
  const fileName = `talking-portrait-${videoName}`;
32
+ const videoBlob = new File([blob], fileName, { type: 'video/mp4' });
33
 
34
  console.log(videoBlob);
35