diff options
-rw-r--r-- | client/src/app/videos/video-watch/video-watch.component.ts | 9 |
1 files changed, 4 insertions, 5 deletions
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 { | |||
66 | } | 66 | } |
67 | 67 | ||
68 | ngOnDestroy () { | 68 | ngOnDestroy () { |
69 | // Remove WebTorrent stuff | 69 | // Remove player if it exists |
70 | console.log('Removing video from webtorrent.') | 70 | if (this.videoNotFound === false) { |
71 | 71 | videojs(this.playerElement).dispose() | |
72 | // Remove player | 72 | } |
73 | videojs(this.playerElement).dispose() | ||
74 | 73 | ||
75 | // Unsubscribe subscriptions | 74 | // Unsubscribe subscriptions |
76 | this.paramsSub.unsubscribe() | 75 | this.paramsSub.unsubscribe() |