From c729caf6cc34630877a0e5a1bda1719384cd0c8a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Feb 2022 10:51:33 +0100 Subject: Add basic video editor support --- .../edit-custom-config.component.ts | 3 +++ .../edit-vod-transcoding.component.html | 25 ++++++++++++++++++++++ .../edit-vod-transcoding.component.ts | 9 ++++++++ .../overview/videos/video-list.component.scss | 1 + 4 files changed, 38 insertions(+) (limited to 'client/src/app/+admin') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index f2eaa3033..e3b6f8305 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -197,6 +197,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { resolutions: {} } }, + videoEditor: { + enabled: null + }, autoBlacklist: { videos: { ofUsers: { diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index 1158f027b..2be855756 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html @@ -192,4 +192,29 @@ + +
+
+
VIDEO EDITOR
+
+ Allows your users to edit their video (cut, add intro/outro, add a watermark etc) +
+
+ +
+ + +
+ + + ⚠️ You need to enable transcoding first to enable video editor + + +
+
+
+
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index 3397c3dbd..948c10b69 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts @@ -71,6 +71,8 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { } private checkTranscodingFields () { + const transcodingControl = this.form.get('transcoding.enabled') + const videoEditorControl = this.form.get('videoEditor.enabled') const hlsControl = this.form.get('transcoding.hls.enabled') const webtorrentControl = this.form.get('transcoding.webtorrent.enabled') @@ -95,5 +97,12 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { webtorrentControl.enable() } }) + + transcodingControl.valueChanges + .subscribe(newValue => { + if (newValue === false) { + videoEditorControl.setValue(false) + } + }) } } diff --git a/client/src/app/+admin/overview/videos/video-list.component.scss b/client/src/app/+admin/overview/videos/video-list.component.scss index 543cb433c..616b9bc6b 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.scss +++ b/client/src/app/+admin/overview/videos/video-list.component.scss @@ -1,5 +1,6 @@ @use '_variables' as *; @use '_mixins' as *; + my-embed { display: block; max-width: 500px; -- cgit v1.2.3