Fix exception when getting 404 in video watch
This commit is contained in:
parent
14d3270f36
commit
2ed6a0aedc
|
@ -66,11 +66,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy () {
|
ngOnDestroy () {
|
||||||
// Remove WebTorrent stuff
|
// Remove player if it exists
|
||||||
console.log('Removing video from webtorrent.')
|
if (this.videoNotFound === false) {
|
||||||
|
videojs(this.playerElement).dispose()
|
||||||
// Remove player
|
}
|
||||||
videojs(this.playerElement).dispose()
|
|
||||||
|
|
||||||
// Unsubscribe subscriptions
|
// Unsubscribe subscriptions
|
||||||
this.paramsSub.unsubscribe()
|
this.paramsSub.unsubscribe()
|
||||||
|
|
Loading…
Reference in New Issue