MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / cleanupVideoElement

Method cleanupVideoElement

src/actions/Video.ts:21–27  ·  view source on GitHub ↗

* Properly cleanup a video element to prevent memory leaks

(element: HTMLVideoElement)

Source from the content-addressed store, hash-verified

19 * Properly cleanup a video element to prevent memory leaks
20 */
21 static cleanupVideoElement(element: HTMLVideoElement): void {
22 element.pause();
23 element.onended = null;
24 element.onerror = null;
25 element.src = '';
26 element.load(); // Reset the element
27 }
28
29 static override async shouldProceed(): Promise<void> {
30 if (Video.blocking) {

Callers 4

resetMethod · 0.80
applyMethod · 0.80
revertMethod · 0.80
applyMethod · 0.80

Calls 1

pauseMethod · 0.80

Tested by

no test coverage detected