Support using the custom video serving endpoint even if you don't use object storage (#2924)

* feat(video): refactor video serving endpoint

It can now be used without an object storage provider. Closes #2785

* fix: remove debug log
This commit is contained in:
Gabe Kangas
2023-05-30 14:05:24 -07:00
committed by GitHub
parent 31f2db06f7
commit cd458630ec
14 changed files with 156 additions and 79 deletions

View File

@ -40,6 +40,7 @@ const API_CHAT_JOIN_MESSAGES_ENABLED = '/chat/joinmessagesenabled';
const API_CHAT_ESTABLISHED_MODE = '/chat/establishedusermode';
const API_DISABLE_SEARCH_INDEXING = '/disablesearchindexing';
const API_SOCKET_HOST_OVERRIDE = '/sockethostoverride';
const API_VIDEO_SERVING_ENDPOINT = '/videoservingendpoint';
// Federation
const API_FEDERATION_ENABLED = '/federation/enable';
@ -180,6 +181,18 @@ export const TEXTFIELD_PROPS_SOCKET_HOST_OVERRIDE = {
useTrim: true,
};
export const TEXTFIELD_PROPS_VIDEO_SERVING_ENDPOINT = {
apiPath: API_VIDEO_SERVING_ENDPOINT,
fieldName: 'videoServingEndpoint',
label: 'Serving Endpoint',
maxLength: 255,
placeholder: 'http://cdn.provider.endpoint.com',
tip: 'Optional URL that video content should be accessed from instead of the default. Used with CDNs and specific storage providers. Generally not required.',
type: TEXTFIELD_TYPE_URL,
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
useTrim: true,
};
// MISC FIELDS
export const FIELD_PROPS_TAGS = {
apiPath: API_TAGS,
@ -521,16 +534,6 @@ export const S3_TEXT_FIELDS_INFO = {
placeholder: 'your secret key',
tip: '',
},
servingEndpoint: {
fieldName: 'servingEndpoint',
label: 'Serving Endpoint',
maxLength: 255,
placeholder: 'http://cdn.ss3.provider.endpoint.com',
tip: 'Optional URL that content should be accessed from instead of the default. Used with CDNs and specific storage providers. Generally not required.',
type: TEXTFIELD_TYPE_URL,
pattern: DEFAULT_TEXTFIELD_URL_PATTERN,
useTrim: true,
},
forcePathStyle: {
fieldName: 'forcePathStyle',
label: 'Force path-style',