Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
implement custom welcome message (#65)
nebunezb1256bcd0880
diff --git a/web/components/config/edit-instance-details.tsx b/web/components/config/edit-instance-details.tsxindex f6808a7cd2..4f73114676 100644--- a/web/components/config/edit-instance-details.tsx+++ b/web/components/config/edit-instance-details.tsx@@ -12,6 +12,7 @@ import {TEXTFIELD_PROPS_INSTANCE_URL,TEXTFIELD_PROPS_SERVER_NAME,TEXTFIELD_PROPS_SERVER_SUMMARY,+ TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE,TEXTFIELD_PROPS_LOGO,API_YP_SWITCH,FIELD_PROPS_YP,@@ -97,6 +98,14 @@ export default function EditInstanceDetails() {initialValue={instanceDetails.summary}onChange={handleFieldChange}/>+ <TextFieldWithSubmit+ fieldName="welcomeMessage"+ {...TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE}+ type={TEXTFIELD_TYPE_TEXTAREA}+ value={formDataValues.welcomeMessage}+ initialValue={instanceDetails.welcomeMessage}+ onChange={handleFieldChange}+ /><TextFieldWithSubmitfieldName="logo"{...TEXTFIELD_PROPS_LOGO}diff --git a/web/types/config-section.ts b/web/types/config-section.tsindex ee565782b3..a8dea7c156 100644--- a/web/types/config-section.ts+++ b/web/types/config-section.ts@@ -35,6 +35,7 @@ export interface ConfigInstanceDetailsFields {socialHandles: SocialHandle[];streamTitle: string;summary: string;+ welcomeMessage: string;tags: string[];title: string;}diff --git a/web/utils/config-constants.tsx b/web/utils/config-constants.tsxindex e01d793ee0..c1056a71c2 100644--- a/web/utils/config-constants.tsx+++ b/web/utils/config-constants.tsx@@ -15,6 +15,7 @@ export const API_NSFW_SWITCH = '/nsfw';export const API_RTMP_PORT = '/rtmpserverport';export const API_S3_INFO = '/s3';export const API_SERVER_SUMMARY = '/serversummary';+export const API_SERVER_WELCOME_MESSAGE = '/welcomemessage';export const API_SERVER_NAME = '/name';export const API_SOCIAL_HANDLES = '/socialhandles';export const API_STREAM_KEY = '/key';@@ -63,6 +64,14 @@ export const TEXTFIELD_PROPS_SERVER_SUMMARY = {label: 'About',tip: 'A brief blurb about you, your server, or what your stream is about.',};+export const TEXTFIELD_PROPS_SERVER_WELCOME_MESSAGE = {+ apiPath: API_SERVER_WELCOME_MESSAGE,+ maxLength: 500,+ placeholder: '',+ label: 'Welcome Message',+ tip:+ 'A system chat message sent to viewers when they first connect to chat. Leave blank to disable.',+};export const TEXTFIELD_PROPS_LOGO = {apiPath: API_LOGO,maxLength: 255,diff --git a/web/utils/server-status-context.tsx b/web/utils/server-status-context.tsxindex 803ecd7e31..e0a25eefcd 100644--- a/web/utils/server-status-context.tsx+++ b/web/utils/server-status-context.tsx@@ -17,6 +17,7 @@ export const initialServerConfigState: ConfigDetails = {socialHandles: [],streamTitle: '',summary: '',+ welcomeMessage: '',tags: [],title: '',},