Skip to content

Commit 233fda7

Browse files
authored
New ConnectionQuality.lost case (Protocol 11) (livekit#292)
Reference: livekit/client-sdk-js#961
1 parent 1461398 commit 233fda7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/LiveKit/Types/ConnectionQuality.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import Foundation
1919
@objc
2020
public enum ConnectionQuality: Int {
2121
case unknown
22+
/// Indicates that a participant has temporarily (or permanently) lost connection to LiveKit.
23+
/// For permanent disconnection, ``RoomDelegate/room(_:participantDidLeave:)`` will be invoked after a timeout.
24+
case lost
2225
case poor
2326
case good
2427
case excellent
@@ -30,6 +33,7 @@ extension Livekit_ConnectionQuality {
3033
case .poor: return .poor
3134
case .good: return .good
3235
case .excellent: return .excellent
36+
case .lost: return .lost
3337
default: return .unknown
3438
}
3539
}

Sources/LiveKit/Types/Options/ConnectOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class ConnectOptions: NSObject {
5252
reconnectAttempts = 3
5353
reconnectAttemptDelay = .defaultReconnectAttemptDelay
5454
iceServers = []
55-
protocolVersion = .v10
55+
protocolVersion = .v11
5656
}
5757

5858
@objc
@@ -61,7 +61,7 @@ public class ConnectOptions: NSObject {
6161
reconnectAttempts: Int = 3,
6262
reconnectAttemptDelay: TimeInterval = .defaultReconnectAttemptDelay,
6363
iceServers: [IceServer] = [],
64-
protocolVersion: ProtocolVersion = .v10)
64+
protocolVersion: ProtocolVersion = .v11)
6565
{
6666
self.autoSubscribe = autoSubscribe
6767
self.publishOnlyMode = publishOnlyMode

0 commit comments

Comments
 (0)