buzz / mediainfo.js

Extract media file metadata in the browser using WebAssembly.
https://mediainfo.js.org
BSD 2-Clause "Simplified" License
692 stars 106 forks source link

Can't lauch with React. Error - export 'MediaInfo' was not found in 'mediainfo.js' #160

Open StasSpawn opened 2 hours ago

StasSpawn commented 2 hours ago

1) npx create-react-app my-app 2) npm install mediainfo.js 3) Add app.js from https://github.com/buzz/mediainfo.js/blob/main/examples/webpack-react/src/App.tsx 4) Remove TS things (using simple js)

And export 'MediaInfo' (imported as 'MediaInfo') was not found in 'mediainfo.js' (possible exports: default, isTrackType, mediaInfoFactory) error appeared.

2024-09-20_160711

StasSpawn commented 1 hour ago

Fix this error by removing MediaInfo from useRef(MediaInfo)

But now new errors after adding video to input 2024-09-20_163626