MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / markPlayRequested

Function markPlayRequested

packages/core/src/runtime/media.ts:107–114  ·  view source on GitHub ↗
(el: HTMLMediaElement)

Source from the content-addressed store, hash-verified

105// event (actual playback started) or on `pause`/`error` (state ended).
106const playRequested = new WeakSet<HTMLMediaElement>();
107function markPlayRequested(el: HTMLMediaElement): void {
108 if (playRequested.has(el)) return;
109 playRequested.add(el);
110 const clear = () => playRequested.delete(el);
111 el.addEventListener("playing", clear, { once: true });
112 el.addEventListener("pause", clear, { once: true });
113 el.addEventListener("error", clear, { once: true });
114}
115
116// HTMLMediaElement.NETWORK_NO_SOURCE — no usable source (404 / unsupported).
117const MEDIA_NETWORK_NO_SOURCE = 3;

Callers 1

syncRuntimeMediaFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected