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

@ -10,6 +10,7 @@ import {
TEXTFIELD_PROPS_SOCKET_HOST_OVERRIDE,
TEXTFIELD_PROPS_ADMIN_PASSWORD,
TEXTFIELD_PROPS_WEB_PORT,
TEXTFIELD_PROPS_VIDEO_SERVING_ENDPOINT,
} from '../../utils/config-constants';
import { UpdateArgs } from '../../types/config-section';
import { ResetYP } from './ResetYP';
@ -24,8 +25,15 @@ export default function EditInstanceDetails() {
const { serverConfig } = serverStatusData || {};
const { adminPassword, ffmpegPath, rtmpServerPort, webServerPort, yp, socketHostOverride } =
serverConfig;
const {
adminPassword,
ffmpegPath,
rtmpServerPort,
webServerPort,
yp,
socketHostOverride,
videoServingEndpoint,
} = serverConfig;
useEffect(() => {
setFormDataValues({
@ -34,6 +42,7 @@ export default function EditInstanceDetails() {
rtmpServerPort,
webServerPort,
socketHostOverride,
videoServingEndpoint,
});
}, [serverConfig]);
@ -119,6 +128,15 @@ export default function EditInstanceDetails() {
type={TEXTFIELD_TYPE_URL}
onChange={handleFieldChange}
/>
<TextFieldWithSubmit
fieldName="videoServingEndpoint"
{...TEXTFIELD_PROPS_VIDEO_SERVING_ENDPOINT}
value={formDataValues.videoServingEndpoint}
initialValue={videoServingEndpoint || ''}
type={TEXTFIELD_TYPE_URL}
onChange={handleFieldChange}
/>
{yp.enabled && <ResetYP />}
</Panel>
</Collapse>