Skip to content

Commit

Permalink
fix the corePath url in production
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-xiaotian committed Jun 18, 2023
1 parent f471be8 commit b71eef5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ export default function Home() {
useEffect(() => {
ffmpegRef.current = createFFmpeg({
log: true,
corePath:
process.env.NODE_ENV === "development"
? `${location.protocol}${location.host}/ffmpeg-core.js`
: "https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js",
corePath: "https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg-core.js",
});
ffmpegRef.current.load();
}, []);
Expand Down

0 comments on commit b71eef5

Please sign in to comment.