rx-player
Version:
Canal+ HTML5 Video Player
25 lines • 952 B
TypeScript
import type { IMainThreadMessage } from "../types";
import CoreInterface from "./base";
/**
* `CoreInterface` implementation for when the core will run in a WebWorker.
*/
export declare class WorkerCoreInterface extends CoreInterface {
private _worker;
/**
* Initialize a `WorkerCoreInterface` for the given `WebWorker` instance.
*
* The `addMessageListener` and `addErrorListener` methods will then register
* listeners respectively for the `onmessage` and `onmessageerror` events
* from this `WebWorker`.
* The `sendMessage` method will allow to send messages to the `WebWorker`.
* @param {Worker} worker
*/
constructor(worker: Worker);
/**
* Send given message to the `WebWorker`.
* @param {Object} msg
* @param {Array.<Object>} [transferables]
*/
sendMessage(msg: IMainThreadMessage, transferables?: Transferable[]): void;
}
//# sourceMappingURL=multithread.d.ts.map