feat(lotus): expected-device check before joining (cinny #121)
EC remembers the picked mic / output by id and silently falls back to the
first device when it is missing, so a user who always joins with a headset
lands on the laptop mic. With lotusDeviceCheck=1:
- the last-picked device's NAME is remembered next to its id
(lotus-audio-{input,output}-name), since ids can change on re-plug;
- before the automatic join, a usual device that is gone is reported to the
host (io.lotus.device_missing) and EC waits for io.lotus.device_decision
{ join }; one that came back under a new id is just re-selected;
- in a call, losing it is reported (io.lotus.device_lost) for a toast.
Fails open (no names / no host / nothing remembered). Without the flag the
join stays synchronous, as upstream. The gate runs once per call: CallView's
effect re-runs while its inputs settle and must not restart it.
Embedded version 0.28.0-lotus.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
83a700b7f6
commit
a366243836
@@ -130,6 +130,20 @@ export enum LotusWidgetActions {
|
||||
CallError = "io.lotus.call_error",
|
||||
/** toWidget: press the error page's Reconnect / Try again (cinny #318). */
|
||||
Reconnect = "io.lotus.reconnect",
|
||||
/**
|
||||
* fromWidget: before the automatic join (`lotusDeviceCheck=1`), the user's
|
||||
* usual mic / output is missing — `{ missing: [{ kind: "audioinput" |
|
||||
* "audiooutput", expected: name, fallback: name | null }] }`. EC waits for
|
||||
* `DeviceDecision` (cinny #121).
|
||||
*/
|
||||
DeviceMissing = "io.lotus.device_missing",
|
||||
/** toWidget: the user's answer, `{ join: boolean }` (cinny #121). */
|
||||
DeviceDecision = "io.lotus.device_decision",
|
||||
/**
|
||||
* fromWidget: in a call, the usual device disappeared — `{ kind, expected,
|
||||
* fallback }` — for a toast (cinny #121).
|
||||
*/
|
||||
DeviceLost = "io.lotus.device_lost",
|
||||
}
|
||||
|
||||
/** toWidget Lotus actions that must be allow-listed in `initializeWidget`. */
|
||||
@@ -148,4 +162,5 @@ export const LOTUS_TO_WIDGET_ACTIONS: LotusWidgetActions[] = [
|
||||
LotusWidgetActions.SetFrameScreenshare,
|
||||
LotusWidgetActions.PromptScreenshare,
|
||||
LotusWidgetActions.Reconnect,
|
||||
LotusWidgetActions.DeviceDecision,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user