MCPcopy
hub / github.com/cpaczek/skylight / start

Method start

tracker/src/video/mse.ts:69–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 start(): void {
70 this.stopped = false;
71 this.spawnProc();
72 if (!this.watchdog) {
73 this.watchdog = setInterval(() => {
74 if (this.stopped || !this.proc) return;
75 if (this.lastDataAt && Date.now() - this.lastDataAt > STALL_MS) {
76 console.error("[mse] stream stalled — restarting ffmpeg");
77 this.lastError = "stream stalled; reconnecting";
78 this.lastDataAt = 0;
79 this.kill();
80 this.restartTimer = setTimeout(() => this.spawnProc(), 1000);
81 }
82 }, 2000);
83 }
84 }
85
86 stop(): void {
87 this.stopped = true;

Callers 1

mainFunction · 0.95

Calls 3

spawnProcMethod · 0.95
killMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected