From ab8432d3722f9d0484a86b87549b85a4989d995b Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Sat, 9 May 2026 17:14:14 -0400 Subject: [PATCH] Add WHIP ingest control component (mirrors WHEP.js pattern) WHIPControl renders an enable checkbox bound to control.whip_ingest.enable. The Edit/index.js save handler maps this to whip_ingest.enabled in the Core API process config via a _upsertProcess monkey-patch. --- overlay/src/misc/controls/WHIP.js | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 overlay/src/misc/controls/WHIP.js diff --git a/overlay/src/misc/controls/WHIP.js b/overlay/src/misc/controls/WHIP.js new file mode 100644 index 0000000..b364f0d --- /dev/null +++ b/overlay/src/misc/controls/WHIP.js @@ -0,0 +1,47 @@ +import React from 'react'; + +import { Trans } from '@lingui/macro'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; + +import Checkbox from '../Checkbox'; + +function init(settings) { + return { enable: false, ...settings }; +} + +export default function Control(props) { + const settings = init(props.settings); + + React.useEffect(() => { + props.onChange(settings, true); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const handleChange = (what) => () => { + if (what === 'enable') { + settings[what] = !settings[what]; + } + props.onChange(settings, false); + }; + + return ( + + + Enable} + checked={settings.enable} + onChange={handleChange('enable')} + /> + + Allow browsers and OBS to push a WebRTC stream into this channel via WHIP. + + + + ); +} + +Control.defaultProps = { + settings: {}, + onChange: function (settings, automatic) {}, +};