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