diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.ts | 13 |
1 files changed, 12 insertions, 1 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 66af9709d..b15de2a79 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -607,6 +607,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
607 | } | 607 | } |
608 | }) | 608 | }) |
609 | 609 | ||
610 | this.player.one('ended', () => { | ||
611 | if (this.video.isLive) { | ||
612 | this.video.state.id = VideoState.LIVE_ENDED | ||
613 | } | ||
614 | }) | ||
615 | |||
610 | this.player.on('theaterChange', (_: any, enabled: boolean) => { | 616 | this.player.on('theaterChange', (_: any, enabled: boolean) => { |
611 | this.zone.run(() => this.theaterEnabled = enabled) | 617 | this.zone.run(() => this.theaterEnabled = enabled) |
612 | }) | 618 | }) |
@@ -844,7 +850,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
844 | if (!this.liveVideosSub) { | 850 | if (!this.liveVideosSub) { |
845 | this.liveVideosSub = this.peertubeSocket.getLiveVideosObservable() | 851 | this.liveVideosSub = this.peertubeSocket.getLiveVideosObservable() |
846 | .subscribe(({ payload }) => { | 852 | .subscribe(({ payload }) => { |
847 | if (payload.state !== VideoState.PUBLISHED || this.video.state.id !== VideoState.WAITING_FOR_LIVE) return | 853 | if (payload.state !== VideoState.PUBLISHED) return |
854 | |||
855 | const videoState = this.video.state.id | ||
856 | if (videoState !== VideoState.WAITING_FOR_LIVE && videoState !== VideoState.LIVE_ENDED) return | ||
857 | |||
858 | console.log('Loading video after live update.') | ||
848 | 859 | ||
849 | const videoUUID = this.video.uuid | 860 | const videoUUID = this.video.uuid |
850 | 861 | ||