Refactor to worker version

This commit is contained in:
Jerome Wu
2019-10-24 07:47:11 +08:00
parent 99adf5138c
commit 9e5d0c5cc6
42 changed files with 579 additions and 109 deletions

12
examples/node/transcode.js Executable file
View File

@@ -0,0 +1,12 @@
const { createWorker } = require('../../src');
const { argv } = process;
const [,, inputPath, outputPath] = argv;
const worker = createWorker();
(async () => {
await worker.load();
const { data } = await worker.transcode(inputPath, outputPath.split('.').pop());
console.log(data.length);
})();