MCPcopy Create free account
hub / github.com/NVIDIA/personaplex / createWorkerWithErrorTracking

Function createWorkerWithErrorTracking

client/src/decoder/decoderWorker.ts:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39// Factory function to create a decoder worker with error tracking
40const createWorkerWithErrorTracking = (): Worker => {
41 const worker = new Worker(
42 new URL("/assets/decoderWorker.min.js", import.meta.url),
43);
44
45 // Track errors from the worker
46 worker.onerror = (event) => {
47 console.error("Decoder worker error:", event.message);
48 lastWorkerError = new Error(event.message);
49 };
50
51 return worker;
52};
53
54// Send init command to a worker, then send warmup BOS page
55const sendInitCommand = (worker: Worker, audioContextSampleRate: number): void => {

Callers 2

prewarmDecoderWorkerFunction · 0.85
createDecoderWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected