Skip to content

Commit 3930acb

Browse files
committed
Enable mic w/o preconnect
1 parent a787606 commit 3930acb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Sources/LiveKit/Agent/Agent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public struct Agent: Loggable {
9696
/// A boolean value indicating whether the agent is connected.
9797
public var isConnected: Bool {
9898
switch state {
99+
case .connecting(buffering: true): true
99100
case .connected: true
100101
default: false
101102
}

Sources/LiveKit/Agent/Session.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ open class Session: ObservableObject {
255255
try await connect()
256256
}
257257
} else {
258+
agent.connecting(buffering: false)
258259
try await connect()
260+
try await room.localParticipant.setMicrophone(enabled: true)
259261
}
260262
} catch {
261263
self.error = .failedToConnect(error)

0 commit comments

Comments
 (0)