aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-live
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-04 09:24:14 +0100
committerChocobozzz <me@florianbigard.com>2020-12-04 09:24:14 +0100
commit312644ce3a59fcc10cc08d422081ebacfa14eec7 (patch)
treeddc365e65df3dca0e278e770cd5521f3f61a3111 /client/src/app/shared/shared-video-live
parente26dc0cdbda13f8b65ab2be3a0e13e7ef5c4b98c (diff)
downloadPeerTube-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')
-rw-r--r--client/src/app/shared/shared-video-live/live-stream-information.component.html11
-rw-r--r--client/src/app/shared/shared-video-live/live-stream-information.component.scss6
-rw-r--r--client/src/app/shared/shared-video-live/live-stream-information.component.ts12
3 files changed, 17 insertions, 12 deletions
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.html b/client/src/app/shared/shared-video-live/live-stream-information.component.html
index 2e65e1de9..6693c1af2 100644
--- a/client/src/app/shared/shared-video-live/live-stream-information.component.html
+++ b/client/src/app/shared/shared-video-live/live-stream-information.component.html
@@ -5,15 +5,20 @@
5 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="dismiss()"></my-global-icon> 5 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="dismiss()"></my-global-icon>
6 </div> 6 </div>
7 7
8 <div class="modal-body"> 8 <div class="modal-body" *ngIf="live">
9 <div>
10 <div class="badge badge-info" *ngIf="live.permanentLive" i18n>Permanent live</div>
11 <div class="badge badge-info" *ngIf="live.saveReplay" i18n>Replay will be saved</div>
12 </div>
13
9 <div class="form-group"> 14 <div class="form-group">
10 <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> 15 <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label>
11 <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="rtmpUrl"></my-input-readonly-copy> 16 <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="live.rtmpUrl"></my-input-readonly-copy>
12 </div> 17 </div>
13 18
14 <div class="form-group"> 19 <div class="form-group">
15 <label for="liveVideoStreamKey" i18n>Live stream key</label> 20 <label for="liveVideoStreamKey" i18n>Live stream key</label>
16 <my-input-readonly-copy id="liveVideoStreamKey" [value]="streamKey"></my-input-readonly-copy> 21 <my-input-readonly-copy id="liveVideoStreamKey" [value]="live.streamKey"></my-input-readonly-copy>
17 22
18 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div> 23 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div>
19 </div> 24 </div>
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.scss b/client/src/app/shared/shared-video-live/live-stream-information.component.scss
index a79fec179..00d839448 100644
--- a/client/src/app/shared/shared-video-live/live-stream-information.component.scss
+++ b/client/src/app/shared/shared-video-live/live-stream-information.component.scss
@@ -7,4 +7,8 @@ p-autocomplete {
7 7
8.form-group { 8.form-group {
9 margin: 20px 0; 9 margin: 20px 0;
10} \ No newline at end of file 10}
11
12.badge {
13 font-size: 13px;
14}
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 @@
1import { Component, ElementRef, ViewChild } from '@angular/core' 1import { Component, ElementRef, ViewChild } from '@angular/core'
2import { Video } from '@app/shared/shared-main' 2import { Video } from '@app/shared/shared-main'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { LiveVideo } from '@shared/models'
4import { LiveVideoService } from './live-video.service' 5import { 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}