From c34aba2f5cef045e7035c1085f9c3a65828a3432 Mon Sep 17 00:00:00 2001 From: gingervitis Date: Sun, 3 Jan 2021 02:13:28 -0800 Subject: [PATCH] initial video settings setup --- web/pages/components/chart.tsx | 2 +- web/pages/config-video.tsx | 1 + web/types/config-section.ts | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/web/pages/components/chart.tsx b/web/pages/components/chart.tsx index e6cbeab3b..57445d35a 100644 --- a/web/pages/components/chart.tsx +++ b/web/pages/components/chart.tsx @@ -1,4 +1,4 @@ -import { LineChart } from 'react-chartkick' +import { LineChart } from 'react-chartkick'; import 'chart.js'; import format from 'date-fns/format'; import styles from '../../styles/styles.module.scss'; diff --git a/web/pages/config-video.tsx b/web/pages/config-video.tsx index a9e0d53f2..100951982 100644 --- a/web/pages/config-video.tsx +++ b/web/pages/config-video.tsx @@ -9,6 +9,7 @@ function VideoVariants({ config }) { if (!config || !config.videoSettings) { return null; } + console.log(config.videoSettings) const videoQualityColumns = [ { diff --git a/web/types/config-section.ts b/web/types/config-section.ts index 92d129123..136edd457 100644 --- a/web/types/config-section.ts +++ b/web/types/config-section.ts @@ -47,6 +47,21 @@ export interface ConfigInstanceDetailsFields { title: string; } +export interface VideoVariant { + audioBitrate: number; + audioPassthrough: number; + encoderPreset: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast'; + framerate: number; + videoBitrate: number; + videoPassthrough: boolean; +} +export interface VideoSettingsFields { + numberOfPlaylistItems: number; + segmentLengthSeconds: number; + videoQualityVariants: VideoVariant[], +} + + export interface ConfigDetails { ffmpegPath: string; instanceDetails: ConfigInstanceDetailsFields; @@ -55,5 +70,5 @@ export interface ConfigDetails { streamKey: string; webServerPort: string; yp: ConfigDirectoryFields; - videoSettings: any; // tbd -} \ No newline at end of file + videoSettings: VideoSettingsFields; // tbd +}