fix MediaPlayer reporting error on destruction

This commit is contained in:
Aran-Fey
2026-01-13 20:13:32 +01:00
parent 2f282170f8
commit 39eab55f13
+3
View File
@@ -870,8 +870,11 @@ export class MediaPlayerComponent extends KeyboardFocusableComponent<MediaPlayer
// Explicitly unload the video, just in case someone is still holding a
// reference to this component or element
this.mediaPlayer.pause();
// "" isn't a valid URL, so disable error reporting
this.state.reportError = false;
this.mediaPlayer.onerror = null;
this.mediaPlayer.src = "";
this.mediaPlayer.load();
}