()
| 270 | } |
| 271 | |
| 272 | override async revert(): Promise<void> { |
| 273 | const element = this.engine.element().find(`[data-video="${this.name}"][data-mode="${this.mode}"]`).get(0) as HTMLVideoElement | undefined; |
| 274 | if (element) { |
| 275 | // Exit fullscreen if we're in fullscreen mode |
| 276 | if (this.mode === 'fullscreen' && document.fullscreenElement) { |
| 277 | await document.exitFullscreen().catch(() => { |
| 278 | // Ignore errors when exiting fullscreen |
| 279 | }); |
| 280 | } |
| 281 | Video.cleanupVideoElement(element); |
| 282 | element.remove(); |
| 283 | } |
| 284 | |
| 285 | // Unblock if this was a blocking video |
| 286 | if (this.mode === 'immersive' || this.mode === 'fullscreen' || this.mode === 'modal') { |
| 287 | Video.blocking = false; |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | override async didRevert(): Promise<ActionRevertResult> { |
| 292 | let foundState = false; |
nothing calls this directly
no test coverage detected