From 728a1236aece26bce6452c440cf85622548afab9 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 14 Dec 2020 16:31:10 +0100 Subject: restore live transcoding to live streaming tab --- .../edit-custom-config.component.html | 155 ++++++++++----------- .../select/select-custom-input.component.html | 14 ++ .../select/select-custom-input.component.scss | 0 .../select/select-custom-input.component.ts | 44 ++++++ client/src/sass/bootstrap.scss | 4 +- 5 files changed, 131 insertions(+), 86 deletions(-) create mode 100644 client/src/app/shared/shared-forms/select/select-custom-input.component.html create mode 100644 client/src/app/shared/shared-forms/select/select-custom-input.component.scss create mode 100644 client/src/app/shared/shared-forms/select/select-custom-input.component.ts (limited to 'client/src') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index f041101bf..e2f3a196e 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -841,72 +841,12 @@ - - - - - -
-
-
TRANSCODING LIVE STREAMS
-
- Same as above, transcoding live streams so that they are in a streamable form that any device can play. Requires a beefy CPU, and then some. -
-
- -
- - - - -
- - - Transcoding enabled for live streams - - -
- -
- - -
- -
- - -
-
-
-
-
-
-
-
-
- -
-
- -
- -
-
LOAD REPARTITION
-
- Share CPU power to prioritize one or the other. The total should not be above the number of available threads. -
-
- -
- - -
+
+ + will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding + will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding +
- - -
-
{{ formErrors.live.transcoding.threads }}
-
- -
Transcoding will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }}.
-
Transcoding will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }}.
-
-
@@ -1012,6 +933,7 @@ >
+ @@ -1019,6 +941,71 @@ +
+
+
TRANSCODING
+
+ 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. +
+
+ +
+ + + + +
+ + + Transcoding enabled for live streams + + +
+ +
+ + +
+ +
+ + +
+
+
+
+
+
+
+ +
+ + + will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding + will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding + + +
+ +
+
{{ formErrors.live.transcoding.threads }}
+
+ +
+
+ +
+
+ diff --git a/client/src/app/shared/shared-forms/select/select-custom-input.component.html b/client/src/app/shared/shared-forms/select/select-custom-input.component.html new file mode 100644 index 000000000..84fa15c3d --- /dev/null +++ b/client/src/app/shared/shared-forms/select/select-custom-input.component.html @@ -0,0 +1,14 @@ + + + {{ channel.label }} + + + + diff --git a/client/src/app/shared/shared-forms/select/select-custom-input.component.scss b/client/src/app/shared/shared-forms/select/select-custom-input.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/client/src/app/shared/shared-forms/select/select-custom-input.component.ts b/client/src/app/shared/shared-forms/select/select-custom-input.component.ts new file mode 100644 index 000000000..ba6fef8ad --- /dev/null +++ b/client/src/app/shared/shared-forms/select/select-custom-input.component.ts @@ -0,0 +1,44 @@ +import { Component, forwardRef, Input } from '@angular/core' +import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' + +@Component({ + selector: 'my-select-custom-input', + styleUrls: [ './select-custom-input.component.scss' ], + templateUrl: './select-custom-input.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => SelectCustomInputComponent), + multi: true + } + ] +}) +export class SelectCustomInputComponent implements ControlValueAccessor { + @Input() items: any[] = [] + + selectedId: number + + // ng-select options + bindLabel = 'label' + bindValue = 'id' + clearable = false + searchable = false + + propagateChange = (_: any) => { /* empty */ } + + writeValue (id: number) { + this.selectedId = id + } + + registerOnChange (fn: (_: any) => void) { + this.propagateChange = fn + } + + registerOnTouched () { + // Unused + } + + onModelChange () { + this.propagateChange(this.selectedId) + } +} diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index 0bb349a45..ac53ae7a5 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -363,8 +363,8 @@ ngb-tooltip-window { } .callout { - padding: 1.25rem; - border: 1px solid #eee; + padding: 1.25rem; + border: 1px solid #eee; border-radius: .25rem; & > label { -- cgit v1.2.3