Add server setting to disable chat (#61)
* Add server setting to disable chat * Prettified Code! Co-authored-by: gabek <gabek@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ export const API_VIDEO_SEGMENTS = '/video/streamlatencylevel';
|
||||
export const API_VIDEO_VARIANTS = '/video/streamoutputvariants';
|
||||
export const API_WEB_PORT = '/webserverport';
|
||||
export const API_YP_SWITCH = '/directoryenabled';
|
||||
export const API_CHAT_DISABLE = '/chat/disable';
|
||||
|
||||
export async function postConfigUpdateToAPI(args: ApiPostArgs) {
|
||||
const { apiPath, data, onSuccess, onError } = args;
|
||||
@@ -159,6 +160,14 @@ export const DEFAULT_VARIANT_STATE: VideoVariant = {
|
||||
name: '',
|
||||
};
|
||||
|
||||
export const FIELD_PROPS_DISABLE_CHAT = {
|
||||
apiPath: API_CHAT_DISABLE,
|
||||
configPath: 'chatDisabled',
|
||||
label: 'Disable chat',
|
||||
tip: 'Hide the web chat interface.',
|
||||
useSubmit: true,
|
||||
};
|
||||
|
||||
export const VIDEO_VARIANT_SETTING_DEFAULTS = {
|
||||
// this one is currently unused
|
||||
audioBitrate: {
|
||||
|
||||
@@ -23,6 +23,7 @@ export const initialServerConfigState: ConfigDetails = {
|
||||
ffmpegPath: '',
|
||||
rtmpServerPort: '',
|
||||
webServerPort: '',
|
||||
chatDisabled: false,
|
||||
s3: {
|
||||
accessKey: '',
|
||||
acl: '',
|
||||
|
||||
Reference in New Issue
Block a user