1
0
Fork 0

Fix exception when getting 404 in video watch

This commit is contained in:
Chocobozzz 2017-10-09 11:25:41 +02:00
parent 14d3270f36
commit 2ed6a0aedc
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -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()