mpegts.js
mpegts.js copied to clipboard
unload
After player.unload()
Uncaught TypeError: Cannot read properties of null (reading 'notifyBufferedPositionChanged')
private _onMSEUpdateEnd(): void {
if (this._config.isLive && this._config.liveBufferLatencyChasing && this._live_latency_chaser) {
this._live_latency_chaser.notifyBufferedRangeUpdate();
}
this._loading_controller.notifyBufferedPositionChanged();
}
May I ask if you wrote the code using MSE ?
No, I didn't write any additional code. I just want to stop the stream loading, but not clear the video element (I need the last frame to be visible)
`public unload(): void { this._media_element?.pause();
this._live_latency_synchronizer?.destroy();
this._live_latency_synchronizer = null;
this._live_latency_chaser?.destroy();
this._live_latency_chaser = null;
this._startup_stall_jumper?.destroy();
this._startup_stall_jumper = null;
this._loading_controller?.destroy();
this._loading_controller = null;
this._seeking_handler?.destroy();
this._seeking_handler = null;
this._mse_controller?.flush();
this._transmuxer?.close();
this._transmuxer?.destroy();
this._transmuxer = null;
}`
this._loading_controller has been set null here. so _onMSEUpdateEnd call error.