Use promises to writeFile in README
This commit is contained in:
parent
d1a763bd1e
commit
0300a182b1
@ -66,7 +66,7 @@ const ffmpeg = createFFmpeg({ log: true });
|
|||||||
await ffmpeg.load();
|
await ffmpeg.load();
|
||||||
ffmpeg.FS('writeFile', 'test.avi', await fetchFile('./test.avi'));
|
ffmpeg.FS('writeFile', 'test.avi', await fetchFile('./test.avi'));
|
||||||
await ffmpeg.run('-i', 'test.avi', 'test.mp4');
|
await ffmpeg.run('-i', 'test.avi', 'test.mp4');
|
||||||
fs.writeFileSync('./test.mp4', ffmpeg.FS('readFile', 'test.mp4'));
|
await fs.promises.writeFile('./test.mp4', ffmpeg.FS('readFile', 'test.mp4'));
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user