diff options
author | Chocobozzz <me@florianbigard.com> | 2020-09-25 10:04:21 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | a5cf76afa378aae81af2a9b0ce548e5d2582f832 (patch) | |
tree | 58da320232bee7c9656774c5d6811e82bbf6c696 /client/src/app/+videos/+video-edit | |
parent | de6310b2fcbb8a6b79c546b23dfa1920724faaa7 (diff) | |
download | PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.gz PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.zst PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.zip |
Add watch messages if live has not started
Diffstat (limited to 'client/src/app/+videos/+video-edit')
7 files changed, 24 insertions, 24 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html index c444dd8d3..0802e906d 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html | |||
@@ -195,7 +195,7 @@ | |||
195 | </ng-template> | 195 | </ng-template> |
196 | </ng-container> | 196 | </ng-container> |
197 | 197 | ||
198 | <ng-container ngbNavItem *ngIf="videoLive"> | 198 | <ng-container ngbNavItem *ngIf="liveVideo"> |
199 | <a ngbNavLink i18n>Live settings</a> | 199 | <a ngbNavLink i18n>Live settings</a> |
200 | 200 | ||
201 | <ng-template ngbNavContent> | 201 | <ng-template ngbNavContent> |
@@ -203,13 +203,13 @@ | |||
203 | <div class="col-md-12"> | 203 | <div class="col-md-12"> |
204 | 204 | ||
205 | <div class="form-group"> | 205 | <div class="form-group"> |
206 | <label for="videoLiveRTMPUrl" i18n>Live RTMP Url</label> | 206 | <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> |
207 | <my-input-readonly-copy id="videoLiveRTMPUrl" [value]="videoLive.rtmpUrl"></my-input-readonly-copy> | 207 | <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl"></my-input-readonly-copy> |
208 | </div> | 208 | </div> |
209 | 209 | ||
210 | <div class="form-group"> | 210 | <div class="form-group"> |
211 | <label for="videoLiveStreamKey" i18n>Live stream key</label> | 211 | <label for="liveVideoStreamKey" i18n>Live stream key</label> |
212 | <my-input-readonly-copy id="videoLiveStreamKey" [value]="videoLive.streamKey"></my-input-readonly-copy> | 212 | <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy> |
213 | </div> | 213 | </div> |
214 | </div> | 214 | </div> |
215 | </div> | 215 | </div> |
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index bee65184b..304bf7ed0 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts | |||
@@ -20,7 +20,7 @@ import { | |||
20 | import { FormReactiveValidationMessages, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' | 20 | import { FormReactiveValidationMessages, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' |
21 | import { InstanceService } from '@app/shared/shared-instance' | 21 | import { InstanceService } from '@app/shared/shared-instance' |
22 | import { VideoCaptionEdit, VideoEdit, VideoService } from '@app/shared/shared-main' | 22 | import { VideoCaptionEdit, VideoEdit, VideoService } from '@app/shared/shared-main' |
23 | import { ServerConfig, VideoConstant, VideoLive, VideoPrivacy } from '@shared/models' | 23 | import { ServerConfig, VideoConstant, LiveVideo, VideoPrivacy } from '@shared/models' |
24 | import { RegisterClientFormFieldOptions, RegisterClientVideoFieldOptions } from '@shared/models/plugins/register-client-form-field.model' | 24 | import { RegisterClientFormFieldOptions, RegisterClientVideoFieldOptions } from '@shared/models/plugins/register-client-form-field.model' |
25 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' | 25 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' |
26 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' | 26 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' |
@@ -42,7 +42,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
42 | @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] | 42 | @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] |
43 | @Input() waitTranscodingEnabled = true | 43 | @Input() waitTranscodingEnabled = true |
44 | @Input() type: VideoEditType | 44 | @Input() type: VideoEditType |
45 | @Input() videoLive: VideoLive | 45 | @Input() liveVideo: LiveVideo |
46 | 46 | ||
47 | @ViewChild('videoCaptionAddModal', { static: true }) videoCaptionAddModal: VideoCaptionAddModalComponent | 47 | @ViewChild('videoCaptionAddModal', { static: true }) videoCaptionAddModal: VideoCaptionAddModalComponent |
48 | 48 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html index 6997f5388..8fae4044a 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html | |||
@@ -31,7 +31,7 @@ | |||
31 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> | 31 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> |
32 | <my-video-edit | 32 | <my-video-edit |
33 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" | 33 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" |
34 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [videoLive]="videoLive" | 34 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" |
35 | type="go-live" | 35 | type="go-live" |
36 | ></my-video-edit> | 36 | ></my-video-edit> |
37 | 37 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts index 64fd4c4d4..0a9efc693 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts | |||
@@ -4,9 +4,9 @@ import { Router } from '@angular/router' | |||
4 | import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' | 4 | import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' |
5 | import { scrollToTop } from '@app/helpers' | 5 | import { scrollToTop } from '@app/helpers' |
6 | import { FormValidatorService } from '@app/shared/shared-forms' | 6 | import { FormValidatorService } from '@app/shared/shared-forms' |
7 | import { VideoCaptionService, VideoEdit, VideoService, VideoLiveService } from '@app/shared/shared-main' | 7 | import { LiveVideoService, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
9 | import { VideoCreate, VideoLive, VideoPrivacy } from '@shared/models' | 9 | import { LiveVideo, VideoCreate, VideoPrivacy } from '@shared/models' |
10 | import { VideoSend } from './video-send' | 10 | import { VideoSend } from './video-send' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
@@ -23,7 +23,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
23 | 23 | ||
24 | isInUpdateForm = false | 24 | isInUpdateForm = false |
25 | 25 | ||
26 | videoLive: VideoLive | 26 | liveVideo: LiveVideo |
27 | videoId: number | 27 | videoId: number |
28 | videoUUID: string | 28 | videoUUID: string |
29 | error: string | 29 | error: string |
@@ -38,7 +38,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
38 | protected serverService: ServerService, | 38 | protected serverService: ServerService, |
39 | protected videoService: VideoService, | 39 | protected videoService: VideoService, |
40 | protected videoCaptionService: VideoCaptionService, | 40 | protected videoCaptionService: VideoCaptionService, |
41 | private videoLiveService: VideoLiveService, | 41 | private liveVideoService: LiveVideoService, |
42 | private router: Router | 42 | private router: Router |
43 | ) { | 43 | ) { |
44 | super() | 44 | super() |
@@ -69,7 +69,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
69 | const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId }) | 69 | const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId }) |
70 | this.form.patchValue(toPatch) | 70 | this.form.patchValue(toPatch) |
71 | 71 | ||
72 | this.videoLiveService.goLive(video).subscribe( | 72 | this.liveVideoService.goLive(video).subscribe( |
73 | res => { | 73 | res => { |
74 | this.videoId = res.video.id | 74 | this.videoId = res.video.id |
75 | this.videoUUID = res.video.uuid | 75 | this.videoUUID = res.video.uuid |
@@ -114,10 +114,10 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
114 | } | 114 | } |
115 | 115 | ||
116 | private fetchVideoLive () { | 116 | private fetchVideoLive () { |
117 | this.videoLiveService.getVideoLive(this.videoId) | 117 | this.liveVideoService.getVideoLive(this.videoId) |
118 | .subscribe( | 118 | .subscribe( |
119 | videoLive => { | 119 | liveVideo => { |
120 | this.videoLive = videoLive | 120 | this.liveVideo = liveVideo |
121 | }, | 121 | }, |
122 | 122 | ||
123 | err => { | 123 | err => { |
diff --git a/client/src/app/+videos/+video-edit/video-update.component.html b/client/src/app/+videos/+video-edit/video-update.component.html index 5f50ddc74..f290fd136 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.html +++ b/client/src/app/+videos/+video-edit/video-update.component.html | |||
@@ -11,7 +11,7 @@ | |||
11 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" | 11 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
12 | [videoCaptions]="videoCaptions" [waitTranscodingEnabled]="waitTranscodingEnabled" | 12 | [videoCaptions]="videoCaptions" [waitTranscodingEnabled]="waitTranscodingEnabled" |
13 | type="update" (pluginFieldsAdded)="hydratePluginFieldsFromVideo()" | 13 | type="update" (pluginFieldsAdded)="hydratePluginFieldsFromVideo()" |
14 | [videoLive]="videoLive" | 14 | [liveVideo]="liveVideo" |
15 | ></my-video-edit> | 15 | ></my-video-edit> |
16 | 16 | ||
17 | <div class="submit-container"> | 17 | <div class="submit-container"> |
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index c0f46acd2..ec1305a33 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -5,7 +5,7 @@ import { Notifier } from '@app/core' | |||
5 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' | 5 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' |
6 | import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' | 6 | import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' |
7 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
8 | import { VideoPrivacy, VideoLive } from '@shared/models' | 8 | import { LiveVideo, VideoPrivacy } from '@shared/models' |
9 | import { hydrateFormFromVideo } from './shared/video-edit-utils' | 9 | import { hydrateFormFromVideo } from './shared/video-edit-utils' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
@@ -17,7 +17,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
17 | video: VideoEdit | 17 | video: VideoEdit |
18 | userVideoChannels: SelectChannelItem[] = [] | 18 | userVideoChannels: SelectChannelItem[] = [] |
19 | videoCaptions: VideoCaptionEdit[] = [] | 19 | videoCaptions: VideoCaptionEdit[] = [] |
20 | videoLive: VideoLive | 20 | liveVideo: LiveVideo |
21 | 21 | ||
22 | isUpdatingVideo = false | 22 | isUpdatingVideo = false |
23 | schedulePublicationPossible = false | 23 | schedulePublicationPossible = false |
@@ -42,11 +42,11 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
42 | 42 | ||
43 | this.route.data | 43 | this.route.data |
44 | .pipe(map(data => data.videoData)) | 44 | .pipe(map(data => data.videoData)) |
45 | .subscribe(({ video, videoChannels, videoCaptions, videoLive }) => { | 45 | .subscribe(({ video, videoChannels, videoCaptions, liveVideo }) => { |
46 | this.video = new VideoEdit(video) | 46 | this.video = new VideoEdit(video) |
47 | this.userVideoChannels = videoChannels | 47 | this.userVideoChannels = videoChannels |
48 | this.videoCaptions = videoCaptions | 48 | this.videoCaptions = videoCaptions |
49 | this.videoLive = videoLive | 49 | this.liveVideo = liveVideo |
50 | 50 | ||
51 | this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE | 51 | this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE |
52 | 52 | ||
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts index 3a82324c3..b7ec22dd5 100644 --- a/client/src/app/+videos/+video-edit/video-update.resolver.ts +++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts | |||
@@ -2,13 +2,13 @@ import { forkJoin, of } from 'rxjs' | |||
2 | import { map, switchMap } from 'rxjs/operators' | 2 | import { map, switchMap } from 'rxjs/operators' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | 4 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' |
5 | import { VideoCaptionService, VideoChannelService, VideoDetails, VideoLiveService, VideoService } from '@app/shared/shared-main' | 5 | import { VideoCaptionService, VideoChannelService, VideoDetails, LiveVideoService, VideoService } from '@app/shared/shared-main' |
6 | 6 | ||
7 | @Injectable() | 7 | @Injectable() |
8 | export class VideoUpdateResolver implements Resolve<any> { | 8 | export class VideoUpdateResolver implements Resolve<any> { |
9 | constructor ( | 9 | constructor ( |
10 | private videoService: VideoService, | 10 | private videoService: VideoService, |
11 | private videoLiveService: VideoLiveService, | 11 | private liveVideoService: LiveVideoService, |
12 | private videoChannelService: VideoChannelService, | 12 | private videoChannelService: VideoChannelService, |
13 | private videoCaptionService: VideoCaptionService | 13 | private videoCaptionService: VideoCaptionService |
14 | ) { | 14 | ) { |
@@ -49,7 +49,7 @@ export class VideoUpdateResolver implements Resolve<any> { | |||
49 | ), | 49 | ), |
50 | 50 | ||
51 | video.isLive | 51 | video.isLive |
52 | ? this.videoLiveService.getVideoLive(video.id) | 52 | ? this.liveVideoService.getVideoLive(video.id) |
53 | : of(undefined) | 53 | : of(undefined) |
54 | ] | 54 | ] |
55 | } | 55 | } |