Add angular example (#653)

This commit is contained in:
jeromewu
2023-12-17 14:09:11 +08:00
committed by GitHub
parent ea373ad687
commit 623dd12fd3
29 changed files with 6769 additions and 741 deletions

View File

@@ -10,12 +10,12 @@
"preview": "vite preview"
},
"dependencies": {
"@ffmpeg/ffmpeg": "*",
"@ffmpeg/util": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@ffmpeg/ffmpeg": "*",
"@ffmpeg/util": "*",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",

View File

@@ -31,7 +31,7 @@ function App() {
};
const transcode = async () => {
const videoURL = "https://ffmpegwasm.netlify.app/video/video-15s.avi";
const videoURL = "https://raw.githubusercontent.com/ffmpegwasm/testdata/master/video-15s.avi";
const ffmpeg = ffmpegRef.current;
await ffmpeg.writeFile("input.avi", await fetchFile(videoURL));
await ffmpeg.exec(["-i", "input.avi", "output.mp4"]);