aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-22 10:46:52 +0100
committerChocobozzz <me@florianbigard.com>2021-02-22 10:46:52 +0100
commit0a6817f0ba29865576bb16e87fbf62679de885d7 (patch)
tree2a7744e596cf83ab7956666ed0457bd03949a560 /client/src/app
parent70243d7a3575402dee00669da5c0d00a4b27dba4 (diff)
downloadPeerTube-0a6817f0ba29865576bb16e87fbf62679de885d7.tar.gz
PeerTube-0a6817f0ba29865576bb16e87fbf62679de885d7.tar.zst
PeerTube-0a6817f0ba29865576bb16e87fbf62679de885d7.zip
Correctly load live information when not started
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts23
1 files changed, 14 insertions, 9 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 24f0d8b41..11b63297e 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -553,6 +553,19 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
553 if (res === false) return this.location.back() 553 if (res === false) return this.location.back()
554 } 554 }
555 555
556 this.buildPlayer(urlOptions)
557 .catch(err => console.error('Cannot build the player', err))
558
559 this.setVideoDescriptionHTML()
560 this.setVideoLikesBarTooltipText()
561
562 this.setOpenGraphTags()
563 this.checkUserRating()
564
565 this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', { videojs })
566 }
567
568 private async buildPlayer (urlOptions: URLOptions) {
556 const videoState = this.video.state.id 569 const videoState = this.video.state.id
557 if (videoState === VideoState.LIVE_ENDED || videoState === VideoState.WAITING_FOR_LIVE) return 570 if (videoState === VideoState.LIVE_ENDED || videoState === VideoState.WAITING_FOR_LIVE) return
558 571
@@ -568,7 +581,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
568 581
569 const params = { 582 const params = {
570 video: this.video, 583 video: this.video,
571 videoCaptions, 584 videoCaptions: this.videoCaptions,
572 urlOptions, 585 urlOptions,
573 user: this.user 586 user: this.user
574 } 587 }
@@ -642,14 +655,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
642 655
643 this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs, video: this.video }) 656 this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs, video: this.video })
644 }) 657 })
645
646 this.setVideoDescriptionHTML()
647 this.setVideoLikesBarTooltipText()
648
649 this.setOpenGraphTags()
650 this.checkUserRating()
651
652 this.hooks.runAction('action:video-watch.video.loaded', 'video-watch', { videojs })
653 } 658 }
654 659
655 private autoplayNext () { 660 private autoplayNext () {