]>
Commit | Line | Data |
---|---|---|
5f46d28c C |
1 | <ng-container [formGroup]="form"> |
2 | ||
4c8749cb C |
3 | <div class="row mt-5"> |
4 | <div class="col-12 col-lg-4 col-xl-3"> | |
5f46d28c C |
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 | ||
4c8749cb | 11 | <div class="col-12 col-lg-8 col-xl-9"> |
5f46d28c C |
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 | > | |
5f46d28c C |
33 | </my-peertube-checkbox> |
34 | </div> | |
35 | ||
f443a746 C |
36 | <div class="form-group" formGroupName="latencySetting" [ngClass]="getDisabledLiveClass()"> |
37 | <my-peertube-checkbox | |
38 | inputName="liveLatencySettingEnabled" formControlName="enabled" | |
39 | i18n-labelText labelText="Allow your users to change live latency" | |
40 | > | |
41 | <ng-container ngProjectAs="description" i18n> | |
42 | Small latency disables P2P and high latency can increase P2P ratio | |
43 | </ng-container> | |
44 | ||
45 | </my-peertube-checkbox> | |
46 | </div> | |
47 | ||
70e33515 | 48 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5b0ec7cd C |
49 | <label i18n for="liveMaxInstanceLives">Max simultaneous lives created on your instance</label> |
50 | ||
51 | <span class="ms-2 small muted">(-1 for "unlimited")</span> | |
70e33515 | 52 | |
5f46d28c C |
53 | <div class="number-with-unit"> |
54 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> | |
55 | <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span> | |
56 | </div> | |
45ba09fe C |
57 | |
58 | <div *ngIf="formErrors.live.maxInstanceLives" class="form-error">{{ formErrors.live.maxInstanceLives }}</div> | |
5f46d28c C |
59 | </div> |
60 | ||
70e33515 | 61 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5b0ec7cd C |
62 | <label i18n for="liveMaxUserLives">Max simultaneous lives created per user</label> |
63 | <span class="ms-2 small muted">(-1 for "unlimited")</span> | |
70e33515 | 64 | |
5f46d28c C |
65 | <div class="number-with-unit"> |
66 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> | |
67 | <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span> | |
68 | </div> | |
45ba09fe C |
69 | |
70 | <div *ngIf="formErrors.live.maxUserLives" class="form-error">{{ formErrors.live.maxUserLives }}</div> | |
5f46d28c C |
71 | </div> |
72 | ||
70e33515 | 73 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5f46d28c C |
74 | <label i18n for="liveMaxDuration">Max live duration</label> |
75 | ||
76 | <my-select-options | |
77 | labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration" | |
78 | bindLabel="label" bindValue="value" [clearable]="false" [searchable]="true" | |
79 | ></my-select-options> | |
45ba09fe C |
80 | |
81 | <div *ngIf="formErrors.live.maxDuration" class="form-error">{{ formErrors.live.maxDuration }}</div> | |
5f46d28c C |
82 | </div> |
83 | ||
84 | </ng-container> | |
85 | </my-peertube-checkbox> | |
86 | </div> | |
87 | </ng-container> | |
88 | </div> | |
89 | </div> | |
90 | ||
4c8749cb C |
91 | <div class="row"> <!-- transcoding live streams grid --> |
92 | <div class="col-12 col-lg-4 col-xl-3"> | |
5f46d28c C |
93 | <div i18n class="inner-form-title">TRANSCODING</div> |
94 | <div i18n class="inner-form-description"> | |
95 | 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. | |
96 | </div> | |
97 | </div> | |
98 | ||
4c8749cb | 99 | <div class="col-12 col-lg-8 col-xl-9"> |
5f46d28c C |
100 | |
101 | <ng-container formGroupName="live"> | |
102 | <ng-container formGroupName="transcoding"> | |
103 | ||
70e33515 | 104 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5f46d28c C |
105 | <my-peertube-checkbox |
106 | inputName="liveTranscodingEnabled" formControlName="enabled" | |
107 | > | |
108 | <ng-template ptTemplate="label"> | |
109 | <ng-container i18n>Transcoding enabled for live streams</ng-container> | |
110 | </ng-template> | |
111 | </my-peertube-checkbox> | |
112 | </div> | |
113 | ||
70e33515 | 114 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c C |
115 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> |
116 | ||
4c8749cb | 117 | <div class="ms-2 mt-2 d-flex flex-column"> |
5f46d28c | 118 | <ng-container formGroupName="resolutions"> |
70e33515 | 119 | |
5f46d28c C |
120 | <div class="form-group" *ngFor="let resolution of liveResolutions"> |
121 | <my-peertube-checkbox | |
122 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
123 | labelText="{{resolution.label}}" | |
124 | > | |
125 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
126 | <div [innerHTML]="resolution.description"></div> | |
127 | </ng-template> | |
128 | </my-peertube-checkbox> | |
129 | </div> | |
70e33515 | 130 | |
5f46d28c C |
131 | </ng-container> |
132 | </div> | |
133 | </div> | |
134 | ||
70e33515 | 135 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c | 136 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> |
70e33515 | 137 | |
5b0ec7cd | 138 | <span class="small muted ms-1"> |
70e33515 C |
139 | <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n> |
140 | will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding | |
141 | </ng-container> | |
142 | ||
143 | <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n> | |
144 | will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding | |
145 | </ng-container> | |
5f46d28c C |
146 | </span> |
147 | ||
148 | <my-select-custom-value | |
149 | id="liveTranscodingThreads" | |
150 | [items]="transcodingThreadOptions" | |
151 | formControlName="threads" | |
152 | [clearable]="false" | |
153 | ></my-select-custom-value> | |
154 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | |
155 | </div> | |
156 | ||
70e33515 | 157 | <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c | 158 | <label i18n for="liveTranscodingProfile">Live transcoding profile</label> |
5b0ec7cd | 159 | <span class="small muted ms-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span> |
5f46d28c C |
160 | |
161 | <my-select-options | |
162 | id="liveTranscodingProfile" | |
163 | formControlName="profile" | |
b06f1ead | 164 | [items]="transcodingProfiles" |
5f46d28c C |
165 | [clearable]="false" |
166 | > | |
5f46d28c | 167 | </my-select-options> |
70e33515 | 168 | |
5f46d28c C |
169 | <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div> |
170 | </div> | |
171 | ||
172 | </ng-container> | |
173 | </ng-container> | |
174 | ||
175 | </div> | |
176 | </div> | |
177 | </ng-container> |