Refactor to load wasm module in a web worker to prevent blocking main browser thread. Update FS to use WORKERFS.

This commit is contained in:
Alf
2020-12-21 22:38:14 -08:00
parent 8dadddcb24
commit 3a7d96443c
6 changed files with 26 additions and 48 deletions

View File

@@ -6,7 +6,8 @@ dist/ffprobe-wasm.js:
-I/opt/ffmpeg/include/ \
-s EXTRA_EXPORTED_RUNTIME_METHODS="[FS, cwrap, ccall, getValue, setValue, writeAsciiToMemory]" \
-s INITIAL_MEMORY=268435456 \
-lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil -lm -lx264 \
-pthread \
-lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil -lm -lx264 -pthread \
-lworkerfs.js \
-o dist/ffprobe-wasm.js \
src/ffprobe-wasm-wrapper.cpp