I might remove Module.setLogger in next builds

This commit is contained in:
Stefano Brilli 2020-03-23 23:45:44 +01:00
parent 4dc41ed89c
commit 7b2338132b
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScop
(self as any).Module().then((m: any) => {
Module = m;
self.postMessage({ action: 'init' });
Module.setLogger((msg: string, stream: string) => console.log(`${stream}: ${msg}`));
Module.setLogger && Module.setLogger((msg: string, stream: string) => console.log(`${stream}: ${msg}`));
});
} else if (action === 'encode') {
const { bitrate, data } = others;