diff options
Diffstat (limited to 'client')
7 files changed, 13 insertions, 21 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 7be5a3736..fa816fd9e 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 | |||
@@ -141,7 +141,7 @@ | |||
141 | </ng-template> | 141 | </ng-template> |
142 | </my-peertube-checkbox> | 142 | </my-peertube-checkbox> |
143 | 143 | ||
144 | <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> | 144 | <my-peertube-checkbox *ngIf="!hideWaitTranscoding" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> |
145 | <ng-template ptTemplate="label"> | 145 | <ng-template ptTemplate="label"> |
146 | <ng-container i18n>Publish after transcoding</ng-container> | 146 | <ng-container i18n>Publish after transcoding</ng-container> |
147 | </ng-template> | 147 | </ng-template> |
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 0275f66f5..13359a4d1 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 | |||
@@ -22,6 +22,8 @@ import { | |||
22 | import { FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms' | 22 | import { FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms' |
23 | import { InstanceService } from '@app/shared/shared-instance' | 23 | import { InstanceService } from '@app/shared/shared-instance' |
24 | import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main' | 24 | import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main' |
25 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
26 | import { logger } from '@root-helpers/logger' | ||
25 | import { PluginInfo } from '@root-helpers/plugins-manager' | 27 | import { PluginInfo } from '@root-helpers/plugins-manager' |
26 | import { | 28 | import { |
27 | HTMLServerConfig, | 29 | HTMLServerConfig, |
@@ -33,13 +35,11 @@ import { | |||
33 | VideoDetails, | 35 | VideoDetails, |
34 | VideoPrivacy | 36 | VideoPrivacy |
35 | } from '@shared/models' | 37 | } from '@shared/models' |
38 | import { VideoSource } from '@shared/models/videos/video-source' | ||
36 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' | 39 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' |
37 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' | 40 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' |
38 | import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component' | 41 | import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component' |
39 | import { VideoEditType } from './video-edit.type' | 42 | import { VideoEditType } from './video-edit.type' |
40 | import { VideoSource } from '@shared/models/videos/video-source' | ||
41 | import { logger } from '@root-helpers/logger' | ||
42 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
43 | 43 | ||
44 | type VideoLanguages = VideoConstant<string> & { group?: string } | 44 | type VideoLanguages = VideoConstant<string> & { group?: string } |
45 | type PluginField = { | 45 | type PluginField = { |
@@ -66,7 +66,8 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
66 | @Input() videoCaptions: VideoCaptionWithPathEdit[] = [] | 66 | @Input() videoCaptions: VideoCaptionWithPathEdit[] = [] |
67 | @Input() videoSource: VideoSource | 67 | @Input() videoSource: VideoSource |
68 | 68 | ||
69 | @Input() waitTranscodingEnabled = true | 69 | @Input() hideWaitTranscoding = false |
70 | |||
70 | @Input() type: VideoEditType | 71 | @Input() type: VideoEditType |
71 | @Input() liveVideo: LiveVideo | 72 | @Input() liveVideo: LiveVideo |
72 | 73 | ||
@@ -140,7 +141,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
140 | nsfw: 'false', | 141 | nsfw: 'false', |
141 | commentsEnabled: this.serverConfig.defaults.publish.commentsEnabled, | 142 | commentsEnabled: this.serverConfig.defaults.publish.commentsEnabled, |
142 | downloadEnabled: this.serverConfig.defaults.publish.downloadEnabled, | 143 | downloadEnabled: this.serverConfig.defaults.publish.downloadEnabled, |
143 | waitTranscoding: 'true', | 144 | waitTranscoding: true, |
144 | licence: this.serverConfig.defaults.publish.licence, | 145 | licence: this.serverConfig.defaults.publish.licence, |
145 | tags: [] | 146 | tags: [] |
146 | } | 147 | } |
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 2fb29303f..e23fd77c7 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 | |||
@@ -53,7 +53,7 @@ | |||
53 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> | 53 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> |
54 | <my-video-edit | 54 | <my-video-edit |
55 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" | 55 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" |
56 | [forbidScheduledPublication]="true" [waitTranscodingEnabled]="isWaitTranscodingEnabled()" | 56 | [forbidScheduledPublication]="true" [hideWaitTranscoding]="true" |
57 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" | 57 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" |
58 | type="go-live" | 58 | type="go-live" |
59 | ></my-video-edit> | 59 | ></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 4f2276e8c..83a6b2229 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 | |||
@@ -160,10 +160,6 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView | |||
160 | return this.serverConfig.live.maxDuration / 1000 | 160 | return this.serverConfig.live.maxDuration / 1000 |
161 | } | 161 | } |
162 | 162 | ||
163 | isWaitTranscodingEnabled () { | ||
164 | return this.form.value['saveReplay'] === true | ||
165 | } | ||
166 | |||
167 | getNormalLiveDescription () { | 163 | getNormalLiveDescription () { |
168 | if (this.isReplayAllowed()) { | 164 | if (this.isReplayAllowed()) { |
169 | return $localize`Stream only once, replay will replace your live` | 165 | return $localize`Stream only once, replay will replace your live` |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html index 728884986..8541868c5 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html | |||
@@ -96,7 +96,7 @@ | |||
96 | <my-video-edit | 96 | <my-video-edit |
97 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" | 97 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" |
98 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" | 98 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
99 | [waitTranscodingEnabled]="true" [forbidScheduledPublication]="false" | 99 | [forbidScheduledPublication]="false" |
100 | type="upload" | 100 | type="upload" |
101 | ></my-video-edit> | 101 | ></my-video-edit> |
102 | 102 | ||
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 a33ac3db4..af564aeb0 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.html +++ b/client/src/app/+videos/+video-edit/video-update.component.html | |||
@@ -9,7 +9,7 @@ | |||
9 | <my-video-edit | 9 | <my-video-edit |
10 | [form]="form" [formErrors]="formErrors" [forbidScheduledPublication]="forbidScheduledPublication" | 10 | [form]="form" [formErrors]="formErrors" [forbidScheduledPublication]="forbidScheduledPublication" |
11 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" | 11 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
12 | [videoCaptions]="videoCaptions" [waitTranscodingEnabled]="isWaitTranscodingEnabled()" | 12 | [videoCaptions]="videoCaptions" [hideWaitTranscoding]="isWaitTranscodingHidden()" |
13 | type="update" (pluginFieldsAdded)="hydratePluginFieldsFromVideo()" | 13 | type="update" (pluginFieldsAdded)="hydratePluginFieldsFromVideo()" |
14 | [liveVideo]="liveVideo" [videoToUpdate]="videoDetails" | 14 | [liveVideo]="liveVideo" [videoToUpdate]="videoDetails" |
15 | [videoSource]="videoSource" | 15 | [videoSource]="videoSource" |
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 212971447..02398a036 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -28,7 +28,6 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
28 | 28 | ||
29 | isUpdatingVideo = false | 29 | isUpdatingVideo = false |
30 | forbidScheduledPublication = false | 30 | forbidScheduledPublication = false |
31 | waitTranscodingEnabled = true | ||
32 | 31 | ||
33 | private updateDone = false | 32 | private updateDone = false |
34 | 33 | ||
@@ -96,16 +95,12 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
96 | return { canDeactivate: this.formChanged === false, text } | 95 | return { canDeactivate: this.formChanged === false, text } |
97 | } | 96 | } |
98 | 97 | ||
99 | isWaitTranscodingEnabled () { | 98 | isWaitTranscodingHidden () { |
100 | if (this.videoDetails.getFiles().length > 1) { // Already transcoded | 99 | if (this.videoDetails.getFiles().length > 1) { // Already transcoded |
101 | return false | 100 | return true |
102 | } | 101 | } |
103 | 102 | ||
104 | if (this.liveVideo && this.form.value['saveReplay'] !== true) { | 103 | return false |
105 | return false | ||
106 | } | ||
107 | |||
108 | return true | ||
109 | } | 104 | } |
110 | 105 | ||
111 | async update () { | 106 | async update () { |