Native calls: answer MUTED by default (house rule)
Plugin connects the LiveKit room without enabling the mic (nothing captured/ published until the user taps Mic, which is also when iOS asks permission). Web: meetMic starts false so the mic button shows muted; on callConnected the web pushes the muted state to the plugin so builds whose plugin still connects the mic live are muted too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -66,7 +66,10 @@ public class NativeCallPlugin: CAPPlugin, CAPBridgedPlugin, PKPushRegistryDelega
|
||||
await old?.disconnect() // drop any previous/stale connection so we never leave DUPLICATE participants
|
||||
do {
|
||||
try await r.connect(url: url, token: token)
|
||||
try await r.localParticipant.setMicrophone(enabled: true)
|
||||
// House rule: answer MUTED. Not enabling the mic here means nothing is captured/published
|
||||
// until the user taps Mic in the meeting UI (→ setMuted(false) → setMicrophone(true)), which
|
||||
// is also when iOS asks for mic permission. Playback (hearing others) is unaffected.
|
||||
try await r.localParticipant.setMicrophone(enabled: false)
|
||||
self?.notifyListeners("callConnected", data: ["ok": true])
|
||||
} catch {
|
||||
self?.notifyListeners("callError", data: ["error": String(describing: error)])
|
||||
|
||||
Reference in New Issue
Block a user