mirror of
https://github.com/rio-labs/rio.git
synced 2026-05-07 20:09:40 -05:00
fix MediaPlayer reporting error on destruction
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user