aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts25
1 files changed, 24 insertions, 1 deletions
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 2801fc519..a2399eafb 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
@@ -1,6 +1,6 @@
1import { forkJoin } from 'rxjs' 1import { forkJoin } from 'rxjs'
2import { map } from 'rxjs/operators' 2import { map } from 'rxjs/operators'
3import { SelectChannelItem } from 'src/types/select-options-item.model' 3import { SelectChannelItem, SelectOptionsItem } from 'src/types/select-options-item.model'
4import { ChangeDetectorRef, Component, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' 4import { ChangeDetectorRef, Component, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'
5import { AbstractControl, FormArray, FormControl, FormGroup, Validators } from '@angular/forms' 5import { AbstractControl, FormArray, FormControl, FormGroup, Validators } from '@angular/forms'
6import { HooksService, PluginService, ServerService } from '@app/core' 6import { HooksService, PluginService, ServerService } from '@app/core'
@@ -26,6 +26,7 @@ import { PluginInfo } from '@root-helpers/plugins-manager'
26import { 26import {
27 HTMLServerConfig, 27 HTMLServerConfig,
28 LiveVideo, 28 LiveVideo,
29 LiveVideoLatencyMode,
29 RegisterClientFormFieldOptions, 30 RegisterClientFormFieldOptions,
30 RegisterClientVideoFieldOptions, 31 RegisterClientVideoFieldOptions,
31 VideoConstant, 32 VideoConstant,
@@ -78,6 +79,23 @@ export class VideoEditComponent implements OnInit, OnDestroy {
78 videoCategories: VideoConstant<number>[] = [] 79 videoCategories: VideoConstant<number>[] = []
79 videoLicences: VideoConstant<number>[] = [] 80 videoLicences: VideoConstant<number>[] = []
80 videoLanguages: VideoLanguages[] = [] 81 videoLanguages: VideoLanguages[] = []
82 latencyModes: SelectOptionsItem[] = [
83 {
84 id: LiveVideoLatencyMode.SMALL_LATENCY,
85 label: $localize`Small latency`,
86 description: $localize`Reduce latency to ~15s disabling P2P`
87 },
88 {
89 id: LiveVideoLatencyMode.DEFAULT,
90 label: $localize`Default`,
91 description: $localize`Average latency of 30s`
92 },
93 {
94 id: LiveVideoLatencyMode.HIGH_LATENCY,
95 label: $localize`High latency`,
96 description: $localize`Average latency of 60s increasing P2P ratio`
97 }
98 ]
81 99
82 pluginDataFormGroup: FormGroup 100 pluginDataFormGroup: FormGroup
83 101
@@ -141,6 +159,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
141 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR, 159 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR,
142 liveStreamKey: null, 160 liveStreamKey: null,
143 permanentLive: null, 161 permanentLive: null,
162 latencyMode: null,
144 saveReplay: null 163 saveReplay: null
145 } 164 }
146 165
@@ -273,6 +292,10 @@ export class VideoEditComponent implements OnInit, OnDestroy {
273 return this.form.value['permanentLive'] === true 292 return this.form.value['permanentLive'] === true
274 } 293 }
275 294
295 isLatencyModeEnabled () {
296 return this.serverConfig.live.latencySetting.enabled
297 }
298
276 isPluginFieldHidden (pluginField: PluginField) { 299 isPluginFieldHidden (pluginField: PluginField) {
277 if (typeof pluginField.commonOptions.hidden !== 'function') return false 300 if (typeof pluginField.commonOptions.hidden !== 'function') return false
278 301