@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
33 lines (32 loc) • 1.07 kB
JavaScript
'use client';
;
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const components_react_1 = require("@livekit/components-react");
const react_1 = require("react");
/**
* RecordingIndicator
* @alpha
*/
function RecordingIndicator() {
const isRecording = (0, components_react_1.useIsRecording)();
const [wasRecording, setWasRecording] = (0, react_1.useState)(false);
(0, react_1.useEffect)(() => {
if (isRecording !== wasRecording) {
setWasRecording(isRecording);
if (isRecording) {
window.alert('This meeting is being recorded');
}
}
}, [isRecording]);
return ((0, jsx_runtime_1.jsx)("div", { style: {
position: 'absolute',
top: '0',
left: '0',
width: '100%',
height: '100%',
boxShadow: isRecording ? 'red 0px 0px 0px 3px inset' : 'none',
pointerEvents: 'none'
} }));
}
exports.default = RecordingIndicator;