2020-12-28 10:11:26 +01:00
|
|
|
// TS types for elements on the Config pages
|
|
|
|
|
2021-01-24 05:16:01 +01:00
|
|
|
// for dropdown
|
|
|
|
export interface SocialHandleDropdownItem {
|
|
|
|
icon: string;
|
|
|
|
platform: string;
|
|
|
|
key: string;
|
|
|
|
}
|
|
|
|
|
2021-01-17 04:46:19 +01:00
|
|
|
export type FieldUpdaterFunc = (args: UpdateArgs) => void;
|
|
|
|
|
2020-12-28 10:11:26 +01:00
|
|
|
export interface UpdateArgs {
|
2021-01-17 04:46:19 +01:00
|
|
|
value: any;
|
2021-01-30 10:39:58 +01:00
|
|
|
fieldName?: string;
|
2020-12-28 10:11:26 +01:00
|
|
|
path?: string;
|
|
|
|
}
|
2021-01-03 09:29:37 +01:00
|
|
|
|
|
|
|
export interface ApiPostArgs {
|
2021-01-31 10:55:19 +01:00
|
|
|
apiPath: string;
|
|
|
|
data: object;
|
|
|
|
onSuccess?: (arg: any) => void;
|
|
|
|
onError?: (arg: any) => void;
|
2021-01-03 09:29:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ConfigDirectoryFields {
|
|
|
|
enabled: boolean;
|
2021-01-31 10:55:19 +01:00
|
|
|
instanceUrl: string;
|
2021-01-03 09:29:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ConfigInstanceDetailsFields {
|
2021-04-12 09:07:08 +02:00
|
|
|
customStyles: string;
|
2021-01-03 09:29:37 +01:00
|
|
|
extraPageContent: string;
|
|
|
|
logo: string;
|
|
|
|
name: string;
|
|
|
|
nsfw: boolean;
|
2021-01-31 10:55:19 +01:00
|
|
|
socialHandles: SocialHandle[];
|
2021-01-03 09:29:37 +01:00
|
|
|
streamTitle: string;
|
|
|
|
summary: string;
|
|
|
|
tags: string[];
|
|
|
|
title: string;
|
2021-04-12 09:07:08 +02:00
|
|
|
welcomeMessage: string;
|
2021-01-03 09:29:37 +01:00
|
|
|
}
|
|
|
|
|
2021-01-31 07:53:00 +01:00
|
|
|
export type CpuUsageLevel = 1 | 2 | 3 | 4 | 5;
|
2021-01-10 11:37:22 +01:00
|
|
|
|
2021-01-24 05:16:01 +01:00
|
|
|
// from data
|
|
|
|
export interface SocialHandle {
|
2021-01-19 19:34:06 +01:00
|
|
|
platform: string;
|
2021-01-24 05:16:01 +01:00
|
|
|
url: string;
|
2021-01-19 19:34:06 +01:00
|
|
|
}
|
|
|
|
|
2021-01-03 11:13:28 +01:00
|
|
|
export interface VideoVariant {
|
2021-01-10 11:37:22 +01:00
|
|
|
key?: number; // unique identifier generated on client side just for ant table rendering
|
2021-01-31 10:55:19 +01:00
|
|
|
cpuUsageLevel: CpuUsageLevel;
|
2021-01-03 11:13:28 +01:00
|
|
|
framerate: number;
|
2021-01-10 11:37:22 +01:00
|
|
|
|
|
|
|
audioPassthrough: boolean;
|
|
|
|
audioBitrate: number;
|
2021-01-03 11:13:28 +01:00
|
|
|
videoPassthrough: boolean;
|
2021-01-10 11:37:22 +01:00
|
|
|
videoBitrate: number;
|
2021-02-08 02:03:02 +01:00
|
|
|
|
|
|
|
scaledWidth: number;
|
|
|
|
scaledHeight: number;
|
2021-03-11 22:39:36 +01:00
|
|
|
|
|
|
|
name: string;
|
2021-01-03 11:13:28 +01:00
|
|
|
}
|
|
|
|
export interface VideoSettingsFields {
|
2021-01-18 21:11:48 +01:00
|
|
|
latencyLevel: number;
|
2021-01-31 10:55:19 +01:00
|
|
|
videoQualityVariants: VideoVariant[];
|
|
|
|
cpuUsageLevel: CpuUsageLevel;
|
2021-01-03 11:13:28 +01:00
|
|
|
}
|
|
|
|
|
2021-02-01 08:40:39 +01:00
|
|
|
export interface S3Field {
|
|
|
|
acl?: string;
|
|
|
|
accessKey: string;
|
|
|
|
bucket: string;
|
|
|
|
enabled: boolean;
|
|
|
|
endpoint: string;
|
|
|
|
region: string;
|
|
|
|
secret: string;
|
|
|
|
servingEndpoint?: string;
|
2021-10-29 02:33:32 +02:00
|
|
|
forcePathStyle: boolean;
|
2021-02-01 08:40:39 +01:00
|
|
|
}
|
|
|
|
|
2021-03-15 23:27:19 +01:00
|
|
|
export interface ExternalAction {
|
2021-07-09 20:42:01 +02:00
|
|
|
title: string;
|
2021-03-15 23:27:19 +01:00
|
|
|
description: string;
|
|
|
|
url: string;
|
|
|
|
openExternally: boolean;
|
|
|
|
}
|
|
|
|
|
2022-01-12 22:52:37 +01:00
|
|
|
export interface Federation {
|
|
|
|
enabled: boolean;
|
|
|
|
isPrivate: boolean;
|
|
|
|
username: string;
|
|
|
|
goLiveMessage: string;
|
|
|
|
showEngagement: boolean;
|
|
|
|
blockedDomains: string[];
|
|
|
|
}
|
|
|
|
|
2021-01-03 09:29:37 +01:00
|
|
|
export interface ConfigDetails {
|
2021-04-12 09:07:08 +02:00
|
|
|
externalActions: ExternalAction[];
|
2021-01-03 09:29:37 +01:00
|
|
|
ffmpegPath: string;
|
|
|
|
instanceDetails: ConfigInstanceDetailsFields;
|
|
|
|
rtmpServerPort: string;
|
2021-02-01 08:40:39 +01:00
|
|
|
s3: S3Field;
|
2021-01-03 09:29:37 +01:00
|
|
|
streamKey: string;
|
2021-04-12 09:07:08 +02:00
|
|
|
videoSettings: VideoSettingsFields;
|
2021-01-03 09:29:37 +01:00
|
|
|
webServerPort: string;
|
2022-03-07 02:12:37 +01:00
|
|
|
socketHostOverride: string;
|
2021-01-03 09:29:37 +01:00
|
|
|
yp: ConfigDirectoryFields;
|
2021-03-23 04:34:52 +01:00
|
|
|
supportedCodecs: string[];
|
|
|
|
videoCodec: string;
|
2021-07-20 07:02:02 +02:00
|
|
|
forbiddenUsernames: string[];
|
2022-01-12 19:17:14 +01:00
|
|
|
suggestedUsernames: string[];
|
2021-07-20 07:02:02 +02:00
|
|
|
chatDisabled: boolean;
|
2022-03-06 07:36:38 +01:00
|
|
|
chatJoinMessagesEnabled: boolean;
|
2022-01-12 22:52:37 +01:00
|
|
|
federation: Federation;
|
2021-01-03 11:13:28 +01:00
|
|
|
}
|