basisWorker.d.ts 671 B

12345678910111213
  1. /**
  2. * The worker function that gets converted to a blob url to pass into a worker.
  3. * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.
  4. */
  5. export declare function workerFunction(): void;
  6. /**
  7. * Initialize a web worker with the basis transcoder
  8. * @param worker the worker to initialize
  9. * @param wasmBinary the wasm binary to load into the worker
  10. * @param moduleUrl the url to the basis transcoder module
  11. * @returns a promise that resolves when the worker is initialized
  12. */
  13. export declare function initializeWebWorker(worker: Worker, wasmBinary: ArrayBuffer, moduleUrl?: string): Promise<Worker>;