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