]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
Fix updating transcoding profiles
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / config / edit-custom-config / edit-live-configuration.component.html
CommitLineData
5f46d28c
C
1<ng-container [formGroup]="form">
2
3 <div class="form-row mt-5">
4 <div class="form-group col-12 col-lg-4 col-xl-3">
5 <div i18n class="inner-form-title">LIVE</div>
6 <div i18n class="inner-form-description">
7 Enable users of your instance to stream live.
8 </div>
9 </div>
10
11 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
12
13 <ng-container formGroupName="live">
14
15 <div class="form-group">
16 <my-peertube-checkbox inputName="liveEnabled" formControlName="enabled">
17 <ng-template ptTemplate="label">
18 <ng-container i18n>Allow live streaming</ng-container>
19 </ng-template>
20
21 <ng-container ngProjectAs="description">
22 <div i18n>⚠️ Enabling live streaming requires trust in your users and extra moderation work</div>
23 <div i18n>If enabled, your server needs to accept incoming TCP traffic on port {{ getLiveRTMPPort() }}</div>
24 </ng-container>
25
26 <ng-container ngProjectAs="extra">
27
70e33515 28 <div class="form-group" [ngClass]="getDisabledLiveClass()">
5f46d28c
C
29 <my-peertube-checkbox
30 inputName="liveAllowReplay" formControlName="allowReplay"
31 i18n-labelText labelText="Allow your users to automatically publish a replay of their live"
32 >
33 <ng-container ngProjectAs="description" i18n>
34 If the user quota is reached, PeerTube will automatically terminate the live streaming
35 </ng-container>
36 </my-peertube-checkbox>
37 </div>
38
70e33515
C
39 <div class="form-group" [ngClass]="getDisabledLiveClass()">
40 <label i18n for="liveMaxInstanceLives">
41 Max simultaneous lives created on your instance <span class="text-muted">(-1 for "unlimited")</span>
42 </label>
43
5f46d28c
C
44 <div class="number-with-unit">
45 <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" />
46 <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span>
47 </div>
45ba09fe
C
48
49 <div *ngIf="formErrors.live.maxInstanceLives" class="form-error">{{ formErrors.live.maxInstanceLives }}</div>
5f46d28c
C
50 </div>
51
70e33515
C
52 <div class="form-group" [ngClass]="getDisabledLiveClass()">
53 <label i18n for="liveMaxUserLives">
54 Max simultaneous lives created per user <span class="text-muted">(-1 for "unlimited")</span>
55 </label>
56
5f46d28c
C
57 <div class="number-with-unit">
58 <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" />
59 <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span>
60 </div>
45ba09fe
C
61
62 <div *ngIf="formErrors.live.maxUserLives" class="form-error">{{ formErrors.live.maxUserLives }}</div>
5f46d28c
C
63 </div>
64
70e33515 65 <div class="form-group" [ngClass]="getDisabledLiveClass()">
5f46d28c
C
66 <label i18n for="liveMaxDuration">Max live duration</label>
67
68 <my-select-options
69 labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration"
70 bindLabel="label" bindValue="value" [clearable]="false" [searchable]="true"
71 ></my-select-options>
45ba09fe
C
72
73 <div *ngIf="formErrors.live.maxDuration" class="form-error">{{ formErrors.live.maxDuration }}</div>
5f46d28c
C
74 </div>
75
76 </ng-container>
77 </my-peertube-checkbox>
78 </div>
79 </ng-container>
80 </div>
81 </div>
82
83 <div class="form-row"> <!-- transcoding live streams grid -->
84 <div class="form-group col-12 col-lg-4 col-xl-3">
85 <div i18n class="inner-form-title">TRANSCODING</div>
86 <div i18n class="inner-form-description">
87 Same as VOD transcoding, transcoding live streams so that they are in a streamable form that any device can play. Requires a beefy CPU, and then some.
88 </div>
89 </div>
90
91 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
92
93 <ng-container formGroupName="live">
94 <ng-container formGroupName="transcoding">
95
70e33515 96 <div class="form-group" [ngClass]="getDisabledLiveClass()">
5f46d28c
C
97 <my-peertube-checkbox
98 inputName="liveTranscodingEnabled" formControlName="enabled"
99 >
100 <ng-template ptTemplate="label">
101 <ng-container i18n>Transcoding enabled for live streams</ng-container>
102 </ng-template>
103 </my-peertube-checkbox>
104 </div>
105
70e33515 106 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c
C
107 <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
108
109 <div class="ml-2 mt-2 d-flex flex-column">
110 <ng-container formGroupName="resolutions">
70e33515 111
5f46d28c
C
112 <div class="form-group" *ngFor="let resolution of liveResolutions">
113 <my-peertube-checkbox
114 [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
115 labelText="{{resolution.label}}"
116 >
117 <ng-template *ngIf="resolution.description" ptTemplate="help">
118 <div [innerHTML]="resolution.description"></div>
119 </ng-template>
120 </my-peertube-checkbox>
121 </div>
70e33515 122
5f46d28c
C
123 </ng-container>
124 </div>
125 </div>
126
70e33515 127 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c 128 <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
70e33515 129
5f46d28c 130 <span class="text-muted ml-1">
70e33515
C
131 <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>
132 will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
133 </ng-container>
134
135 <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>
136 will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
137 </ng-container>
5f46d28c
C
138 </span>
139
140 <my-select-custom-value
141 id="liveTranscodingThreads"
142 [items]="transcodingThreadOptions"
143 formControlName="threads"
144 [clearable]="false"
145 ></my-select-custom-value>
146 <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
147 </div>
148
70e33515 149 <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c
C
150 <label i18n for="liveTranscodingProfile">Live transcoding profile</label>
151 <span class="text-muted ml-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span>
152
153 <my-select-options
154 id="liveTranscodingProfile"
155 formControlName="profile"
b06f1ead 156 [items]="transcodingProfiles"
5f46d28c
C
157 [clearable]="false"
158 >
5f46d28c 159 </my-select-options>
70e33515 160
5f46d28c
C
161 <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div>
162 </div>
163
164 </ng-container>
165 </ng-container>
166
167 </div>
168 </div>
169</ng-container>