Refactor to worker version
This commit is contained in:
12
examples/node/transcode.js
Executable file
12
examples/node/transcode.js
Executable 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);
|
||||
})();
|
||||
Reference in New Issue
Block a user