lotus(#2): stream per-participant call state over widget API
Opt-in (lotusCallState=1) bridge that emits io.lotus.call_state with each participant's speaking/audio/video state, so the Lotus host can drive speaking rings / mute badges / PiP from real events instead of scraping EC's rendered DOM. Exposes vm.userMedia$ on the public CallViewModel. Additive: no-op without the flag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
39377fb6e1
commit
444af5f7ac
@@ -29,6 +29,7 @@ import { Header, LeftNav, RightNav, RoomHeaderInfo } from "../Header";
|
||||
import { HeaderStyle, useUrlParams } from "../UrlParams";
|
||||
import { useCallViewKeyboardShortcuts } from "../useCallViewKeyboardShortcuts";
|
||||
import { widget } from "../widget";
|
||||
import { startLotusCallState } from "../lotus/lotusCallState";
|
||||
import styles from "./InCallView.module.css";
|
||||
import { GridTile } from "../tile/GridTile";
|
||||
import { SettingsModal, defaultSettingsTab } from "../settings/SettingsModal";
|
||||
@@ -279,6 +280,10 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
const earpieceMode = useBehavior(vm.earpieceMode$);
|
||||
const audioOutputSwitcher = useBehavior(vm.audioOutputSwitcher$);
|
||||
|
||||
// [lotus] Stream per-participant speaking/mute state to the host (cinny) over
|
||||
// the widget API when opted in via lotusCallState=1. No-op otherwise.
|
||||
useEffect(() => startLotusCallState(vm), [vm]);
|
||||
|
||||
const fatalCallError = useBehavior(vm.fatalError$);
|
||||
// Stop the rendering and throw for the error boundary
|
||||
if (fatalCallError) {
|
||||
|
||||
Reference in New Issue
Block a user