aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/+video-edit')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.module.ts4
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html3
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts7
-rw-r--r--client/src/app/+videos/+video-edit/video-update.component.ts5
-rw-r--r--client/src/app/+videos/+video-edit/video-update.resolver.ts3
5 files changed, 14 insertions, 8 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.module.ts b/client/src/app/+videos/+video-edit/shared/video-edit.module.ts
index 593114181..7a3854065 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.module.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.module.ts
@@ -3,6 +3,7 @@ import { NgModule } from '@angular/core'
3import { SharedFormModule } from '@app/shared/shared-forms' 3import { SharedFormModule } from '@app/shared/shared-forms'
4import { SharedGlobalIconModule } from '@app/shared/shared-icons' 4import { SharedGlobalIconModule } from '@app/shared/shared-icons'
5import { SharedMainModule } from '@app/shared/shared-main' 5import { SharedMainModule } from '@app/shared/shared-main'
6import { SharedVideoLiveModule } from '@app/shared/shared-video-live'
6import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' 7import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service'
7import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' 8import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component'
8import { VideoEditComponent } from './video-edit.component' 9import { VideoEditComponent } from './video-edit.component'
@@ -13,7 +14,8 @@ import { VideoEditComponent } from './video-edit.component'
13 14
14 SharedMainModule, 15 SharedMainModule,
15 SharedFormModule, 16 SharedFormModule,
16 SharedGlobalIconModule 17 SharedGlobalIconModule,
18 SharedVideoLiveModule
17 ], 19 ],
18 20
19 declarations: [ 21 declarations: [
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 5657827a9..2ec825978 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
@@ -35,7 +35,8 @@
35<!-- Hidden because we want to load the component --> 35<!-- Hidden because we want to load the component -->
36<form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> 36<form [hidden]="!isInUpdateForm" novalidate [formGroup]="form">
37 <my-video-edit 37 <my-video-edit
38 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" 38 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions"
39 [schedulePublicationPossible]="false" [waitTranscodingEnabled]="false"
39 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" 40 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo"
40 type="go-live" 41 type="go-live"
41 ></my-video-edit> 42 ></my-video-edit>
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 870a70d3d..d29b2da97 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
@@ -5,7 +5,8 @@ import { Router } from '@angular/router'
5import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' 5import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core'
6import { scrollToTop } from '@app/helpers' 6import { scrollToTop } from '@app/helpers'
7import { FormValidatorService } from '@app/shared/shared-forms' 7import { FormValidatorService } from '@app/shared/shared-forms'
8import { LiveVideoService, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 8import { VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
9import { LiveVideoService } from '@app/shared/shared-video-live'
9import { LoadingBarService } from '@ngx-loading-bar/core' 10import { LoadingBarService } from '@ngx-loading-bar/core'
10import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, ServerErrorCode, VideoPrivacy } from '@shared/models' 11import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, ServerErrorCode, VideoPrivacy } from '@shared/models'
11import { VideoSend } from './video-send' 12import { VideoSend } from './video-send'
@@ -64,8 +65,6 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon
64 channelId: this.firstStepChannelId 65 channelId: this.firstStepChannelId
65 } 66 }
66 67
67 this.firstStepDone.emit(name)
68
69 // Go live in private mode, but correctly fill the update form with the first user choice 68 // Go live in private mode, but correctly fill the update form with the first user choice
70 const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId }) 69 const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId })
71 this.form.patchValue(toPatch) 70 this.form.patchValue(toPatch)
@@ -76,6 +75,8 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon
76 this.videoUUID = res.video.uuid 75 this.videoUUID = res.video.uuid
77 this.isInUpdateForm = true 76 this.isInUpdateForm = true
78 77
78 this.firstStepDone.emit(name)
79
79 this.fetchVideoLive() 80 this.fetchVideoLive()
80 }, 81 },
81 82
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 7126ad05b..e37163ca9 100644
--- a/client/src/app/+videos/+video-edit/video-update.component.ts
+++ b/client/src/app/+videos/+video-edit/video-update.component.ts
@@ -1,13 +1,14 @@
1import { of } from 'rxjs'
1import { map, switchMap } from 'rxjs/operators' 2import { map, switchMap } from 'rxjs/operators'
2import { Component, HostListener, OnInit } from '@angular/core' 3import { Component, HostListener, OnInit } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
4import { Notifier } from '@app/core' 5import { Notifier } from '@app/core'
5import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' 6import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms'
6import { LiveVideoService, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' 7import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main'
8import { LiveVideoService } from '@app/shared/shared-video-live'
7import { LoadingBarService } from '@ngx-loading-bar/core' 9import { LoadingBarService } from '@ngx-loading-bar/core'
8import { LiveVideo, LiveVideoUpdate, VideoPrivacy } from '@shared/models' 10import { LiveVideo, LiveVideoUpdate, VideoPrivacy } from '@shared/models'
9import { hydrateFormFromVideo } from './shared/video-edit-utils' 11import { hydrateFormFromVideo } from './shared/video-edit-utils'
10import { of } from 'rxjs'
11 12
12@Component({ 13@Component({
13 selector: 'my-videos-update', 14 selector: 'my-videos-update',
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 5388a64b0..276548b79 100644
--- a/client/src/app/+videos/+video-edit/video-update.resolver.ts
+++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts
@@ -2,7 +2,8 @@ import { forkJoin, of } from 'rxjs'
2import { map, switchMap } from 'rxjs/operators' 2import { map, switchMap } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 4import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
5import { VideoCaptionService, VideoChannelService, VideoDetails, LiveVideoService, VideoService } from '@app/shared/shared-main' 5import { VideoCaptionService, VideoChannelService, VideoDetails, VideoService } from '@app/shared/shared-main'
6import { LiveVideoService } from '@app/shared/shared-video-live'
6 7
7@Injectable() 8@Injectable()
8export class VideoUpdateResolver implements Resolve<any> { 9export class VideoUpdateResolver implements Resolve<any> {