mirror of https://github.com/Chocobozzz/PeerTube
Add missing max fps config in admin
parent
6f93dc041b
commit
7c3eaf868c
|
@ -22,6 +22,7 @@ import {
|
|||
SERVICES_TWITTER_USERNAME_VALIDATOR,
|
||||
SIGNUP_LIMIT_VALIDATOR,
|
||||
SIGNUP_MINIMUM_AGE_VALIDATOR,
|
||||
TRANSCODING_MAX_FPS_VALIDATOR,
|
||||
TRANSCODING_THREADS_VALIDATOR
|
||||
} from '@app/shared/form-validators/custom-config-validators'
|
||||
import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators'
|
||||
|
@ -30,6 +31,7 @@ import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.serv
|
|||
import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service'
|
||||
import { NgbNav, NgbNavContent, NgbNavItem, NgbNavLink, NgbNavLinkBase, NgbNavOutlet } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { CustomConfig, CustomPage, HTMLServerConfig } from '@peertube/peertube-models'
|
||||
import merge from 'lodash-es/merge'
|
||||
import omit from 'lodash-es/omit'
|
||||
import { forkJoin } from 'rxjs'
|
||||
import { SelectOptionsItem } from 'src/types/select-options-item.model'
|
||||
|
@ -40,7 +42,6 @@ import { EditHomepageComponent } from './edit-homepage.component'
|
|||
import { EditInstanceInformationComponent } from './edit-instance-information.component'
|
||||
import { EditLiveConfigurationComponent } from './edit-live-configuration.component'
|
||||
import { EditVODTranscodingComponent } from './edit-vod-transcoding.component'
|
||||
import merge from 'lodash-es/merge'
|
||||
|
||||
type ComponentCustomConfig = CustomConfig & {
|
||||
instanceCustomHomepage: CustomPage
|
||||
|
@ -239,6 +240,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
|||
},
|
||||
remoteRunners: {
|
||||
enabled: null
|
||||
},
|
||||
fps: {
|
||||
max: TRANSCODING_MAX_FPS_VALIDATOR
|
||||
}
|
||||
},
|
||||
live: {
|
||||
|
@ -260,6 +264,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
|||
alwaysTranscodeOriginalResolution: null,
|
||||
remoteRunners: {
|
||||
enabled: null
|
||||
},
|
||||
fps: {
|
||||
max: TRANSCODING_MAX_FPS_VALIDATOR
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<div class="form-group" [ngClass]="getDisabledLiveClass()">
|
||||
<label i18n for="liveMaxInstanceLives">Max simultaneous lives created on your instance</label>
|
||||
|
||||
<span class="ms-2 small muted">(-1 for "unlimited")</span>
|
||||
<span i18n class="ms-2 small muted">(-1 for "unlimited")</span>
|
||||
|
||||
<div class="number-with-unit">
|
||||
<input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" />
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
<div class="form-group" [ngClass]="getDisabledLiveClass()">
|
||||
<label i18n for="liveMaxUserLives">Max simultaneous lives created per user</label>
|
||||
<span class="ms-2 small muted">(-1 for "unlimited")</span>
|
||||
<span i18n class="ms-2 small muted">(-1 for "unlimited")</span>
|
||||
|
||||
<div class="number-with-unit">
|
||||
<input type="number" name="liveMaxUserLives" formControlName="maxUserLives" />
|
||||
|
@ -116,6 +116,19 @@
|
|||
|
||||
<div [ngClass]="getDisabledLiveTranscodingClass()">
|
||||
|
||||
<div class="form-group" formGroupName="fps">
|
||||
<label i18n for="liveTranscodingFPSMax">Max live FPS</label>
|
||||
|
||||
<span i18n class="ms-2 small muted">Cap transcoded live FPS. Max resolution stream still keeps the original FPS.</span>
|
||||
|
||||
<div class="number-with-unit">
|
||||
<input type="number" name="liveTranscodingFPSMax" formControlName="max" />
|
||||
<span>FPS</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="formErrors.live.transcoding.fps.max" class="form-error" role="alert">{{ formErrors.live.transcoding.fps.max }}</div>
|
||||
</div>
|
||||
|
||||
<div class="ms-2 mt-3">
|
||||
<h4 i18n>Live resolutions to generate</h4>
|
||||
|
||||
|
|
|
@ -141,6 +141,19 @@
|
|||
</div>
|
||||
</ng-container>
|
||||
|
||||
<div class="form-group" formGroupName="fps" [ngClass]="getTranscodingDisabledClass()">
|
||||
<label i18n for="transcodingFPSMax">Max video FPS</label>
|
||||
|
||||
<span i18n class="ms-2 small muted">Cap transcoded video FPS. Max resolution file still keeps the original FPS.</span>
|
||||
|
||||
<div class="number-with-unit">
|
||||
<input type="number" name="transcodingFPSMax" formControlName="max" />
|
||||
<span>FPS</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="formErrors.transcoding.fps.max" class="form-error" role="alert">{{ formErrors.transcoding.fps.max }}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
|
||||
<div class="mb-2 fw-bold" i18n>Resolutions to generate</div>
|
||||
|
||||
|
|
|
@ -65,6 +65,14 @@ export const TRANSCODING_THREADS_VALIDATOR: BuildFormValidator = {
|
|||
}
|
||||
}
|
||||
|
||||
export const TRANSCODING_MAX_FPS_VALIDATOR: BuildFormValidator = {
|
||||
VALIDATORS: [ Validators.required, Validators.min(1) ],
|
||||
MESSAGES: {
|
||||
required: $localize`Transcoding max FPS is required.`,
|
||||
min: $localize`Transcoding max FPS must be greater or equal to 1.`
|
||||
}
|
||||
}
|
||||
|
||||
export const MAX_LIVE_DURATION_VALIDATOR: BuildFormValidator = {
|
||||
VALIDATORS: [ Validators.required, Validators.min(-1) ],
|
||||
MESSAGES: {
|
||||
|
|
Loading…
Reference in New Issue