@100mslive/hms-video-store
Version:
@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow
19 lines (18 loc) • 982 B
TypeScript
export declare const worker = "(function workerSetup() {\n function ticker() {\n self.postMessage('tick');\n }\n self.onmessage = function (event) {\n const [data, time] = event.data;\n switch (data) {\n case 'start':\n setTimeout(ticker, time);\n break;\n default:\n break;\n }\n };\n})()";
/**
* Delay for a @see ms amount of time
* @param ms -- time in milliseconds
*/
export declare function sleep(ms: number): Promise<void>;
export declare function workerSleep(ms: number): Promise<void>;
export declare function reusableWorker(): {
sleep: (ms: number) => Promise<void>;
};
/**
* Debounce Fn - Function to limit the number of executions of the passed in
* function in a given time duration
* @param fn Function to be called
* @param delay time by which the function execution has to be delayed
* @returns {void}
*/
export declare function debounce<T extends (...args: any) => any>(fn: T, delay?: number): () => void;