| 85 | } |
| 86 | |
| 87 | static override async reset(): Promise<void> { |
| 88 | // Properly clean up all video elements before removing |
| 89 | this.engine.element().find('[data-video]').each((element: HTMLElement) => { |
| 90 | Video.cleanupVideoElement(element as HTMLVideoElement); |
| 91 | }); |
| 92 | this.engine.element().find('[data-video]').remove(); |
| 93 | |
| 94 | this.engine.history({ |
| 95 | video: [] // string[] |
| 96 | }); |
| 97 | |
| 98 | this.engine.state({ |
| 99 | videos: [] // string[] |
| 100 | }); |
| 101 | } |
| 102 | |
| 103 | static override matchString([show, type]: string[]): boolean { |
| 104 | return show === 'show' && type === 'video'; |