diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-04 09:24:14 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-04 09:24:14 +0100 |
commit | 312644ce3a59fcc10cc08d422081ebacfa14eec7 (patch) | |
tree | ddc365e65df3dca0e278e770cd5521f3f61a3111 /client/src/app/shared/shared-video-live/live-stream-information.component.ts | |
parent | e26dc0cdbda13f8b65ab2be3a0e13e7ef5c4b98c (diff) | |
download | PeerTube-312644ce3a59fcc10cc08d422081ebacfa14eec7.tar.gz PeerTube-312644ce3a59fcc10cc08d422081ebacfa14eec7.tar.zst PeerTube-312644ce3a59fcc10cc08d422081ebacfa14eec7.zip |
Add badge for permanent live in live info modal
Diffstat (limited to 'client/src/app/shared/shared-video-live/live-stream-information.component.ts')
-rw-r--r-- | client/src/app/shared/shared-video-live/live-stream-information.component.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts index e6142eb2e..9a5d2809b 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, ElementRef, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, ViewChild } from '@angular/core' |
2 | import { Video } from '@app/shared/shared-main' | 2 | import { Video } from '@app/shared/shared-main' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { LiveVideo } from '@shared/models' | ||
4 | import { LiveVideoService } from './live-video.service' | 5 | import { LiveVideoService } from './live-video.service' |
5 | 6 | ||
6 | @Component({ | 7 | @Component({ |
@@ -12,8 +13,7 @@ export class LiveStreamInformationComponent { | |||
12 | @ViewChild('modal', { static: true }) modal: ElementRef | 13 | @ViewChild('modal', { static: true }) modal: ElementRef |
13 | 14 | ||
14 | video: Video | 15 | video: Video |
15 | rtmpUrl = '' | 16 | live: LiveVideo |
16 | streamKey = '' | ||
17 | 17 | ||
18 | constructor ( | 18 | constructor ( |
19 | private modalService: NgbModal, | 19 | private modalService: NgbModal, |
@@ -22,8 +22,7 @@ export class LiveStreamInformationComponent { | |||
22 | 22 | ||
23 | show (video: Video) { | 23 | show (video: Video) { |
24 | this.video = video | 24 | this.video = video |
25 | this.rtmpUrl = '' | 25 | this.live = undefined |
26 | this.streamKey = '' | ||
27 | 26 | ||
28 | this.loadLiveInfo(video) | 27 | this.loadLiveInfo(video) |
29 | 28 | ||
@@ -33,9 +32,6 @@ export class LiveStreamInformationComponent { | |||
33 | 32 | ||
34 | private loadLiveInfo (video: Video) { | 33 | private loadLiveInfo (video: Video) { |
35 | this.liveVideoService.getVideoLive(video.id) | 34 | this.liveVideoService.getVideoLive(video.id) |
36 | .subscribe(live => { | 35 | .subscribe(live => this.live = live) |
37 | this.rtmpUrl = live.rtmpUrl | ||
38 | this.streamKey = live.streamKey | ||
39 | }) | ||
40 | } | 36 | } |
41 | } | 37 | } |