(
code: string,
details: Record<string, RuntimeJson>,
dedupeKey?: string,
)
| 174 | runtimeCleanupCallbacks.push(callback); |
| 175 | }; |
| 176 | const postRuntimeDiagnosticOnce = ( |
| 177 | code: string, |
| 178 | details: Record<string, RuntimeJson>, |
| 179 | dedupeKey?: string, |
| 180 | ) => { |
| 181 | const key = dedupeKey ?? `${code}:${JSON.stringify(details)}`; |
| 182 | if (postedDiagnosticKeys.has(key)) { |
| 183 | return; |
| 184 | } |
| 185 | postedDiagnosticKeys.add(key); |
| 186 | postRuntimeMessage({ |
| 187 | source: "hf-preview", |
| 188 | type: "diagnostic", |
| 189 | code, |
| 190 | details, |
| 191 | }); |
| 192 | }; |
| 193 | const createPlayerApiCompat = (basePlayer: { |
| 194 | _timeline: RuntimeTimelineLike | null; |
| 195 | play: () => void; |
no test coverage detected