X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-watch%2Fvideo-watch.component.ts;h=db3e1cdd6e9f3795c9dc128121b4b9701c9661bd;hb=2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713;hp=dbe391fff54e3497beb633fa402fd8a5cd18fe8f;hpb=14d3270f363245d2c83fcc2ac109e39743b5627e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index dbe391fff..db3e1cdd6 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -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()