* Properly cleanup a video element to prevent memory leaks
(element: HTMLVideoElement)
| 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) { |