LiveKit Swift Client SDK Documentation

Class Observable​Room

@available(*, deprecated, message: "Room is now an ObservableObject which can be observed directly.")
open class ObservableRoom: ObservableObject, RoomDelegate, Loggable  
%605 ObservableRoom ObservableRoom RoomDelegate RoomDelegate ObservableRoom->RoomDelegate Loggable Loggable ObservableRoom->Loggable ObservableObject ObservableObject ObservableRoom->ObservableObject

Conforms To

Loggable

Allows to extend with custom log method which automatically captures current type (class name).

RoomDelegate
ObservableObject

Initializers

init(_:​)

public init(_ room: Room = Room())  

Properties

room

public let room: Room

connection​State

public var connectionState: ConnectionState  

metadata

public var metadata: String?  

remote​Participants

public var remoteParticipants: [Sid: ObservableParticipant]  

all​Participants

public var allParticipants: [Sid: ObservableParticipant]  

camera​Track​State

@Published public var cameraTrackState: TrackPublishState  

microphone​Track​State

@Published public var microphoneTrackState: TrackPublishState  

screen​Share​Track​State

@Published public var screenShareTrackState: TrackPublishState  

Methods

switch​Camera​Position()

@discardableResult
    public func switchCameraPosition() -> Promise<Bool>  

toggle​Camera​Enabled()

public func toggleCameraEnabled()  

toggle​Screen​Share​Enabled()

public func toggleScreenShareEnabled()  

toggle​Microphone​Enabled()

public func toggleMicrophoneEnabled()  

room(_:​did​Update:​old​Value:​)

open func room(_ room: Room, didUpdate connectionState: ConnectionState, oldValue: ConnectionState)  

room(_:​participant​Did​Join:​)

open func room(_ room: Room,
                   participantDidJoin participant: RemoteParticipant)  

room(_:​participant​Did​Leave:​)

open func room(_ room: Room,
                   participantDidLeave participant: RemoteParticipant)  

room(_:​participant:​did​Update:​)

open func room(_ room: Room, participant: Participant, didUpdate metadata: String?)  

room(_:​did​Connect:​)

open func room(_ room: Room, didConnect isReconnect: Bool)  

room(_:​did​Fail​ToConnect:​)

open func room(_ room: Room, didFailToConnect error: Error)  

room(_:​did​Disconnect:​)

open func room(_ room: Room, didDisconnect error: Error?)  

room(_:​did​Update:​)

open func room(_ room: Room, didUpdate speakers: [Participant])  

room(_:​did​Update:​)

open func room(_ room: Room, didUpdate metadata: String?)  

room(_:​participant:​did​Update:​)

open func room(_ room: Room, participant: Participant, didUpdate connectionQuality: ConnectionQuality)  

room(_:​participant:​did​Update:​muted:​)

open func room(_ room: Room, participant: Participant, didUpdate publication: TrackPublication, muted: Bool)  

room(_:​participant:​did​Update:​)

open func room(_ room: Room, participant: Participant, didUpdate permissions: ParticipantPermissions)  

room(_:​participant:​did​Update:​stream​State:​)

open func room(_ room: Room, participant: RemoteParticipant, didUpdate publication: RemoteTrackPublication, streamState: StreamState)  

room(_:​participant:​did​Publish:​)

open func room(_ room: Room, participant: RemoteParticipant, didPublish publication: RemoteTrackPublication)  

room(_:​participant:​did​Unpublish:​)

open func room(_ room: Room, participant: RemoteParticipant, didUnpublish publication: RemoteTrackPublication)  

room(_:​participant:​did​Subscribe:​track:​)

open func room(_ room: Room, participant: RemoteParticipant, didSubscribe publication: RemoteTrackPublication, track: Track)  

room(_:​participant:​did​Fail​ToSubscribe:​error:​)

open func room(_ room: Room, participant: RemoteParticipant, didFailToSubscribe trackSid: String, error: Error)  

room(_:​participant:​did​Unsubscribe:​track:​)

open func room(_ room: Room, participant: RemoteParticipant, didUnsubscribe publication: RemoteTrackPublication, track: Track)  

room(_:​participant:​did​Receive:​)

open func room(_ room: Room, participant: RemoteParticipant?, didReceive data: Data)  

room(_:​local​Participant:​did​Publish:​)

open func room(_ room: Room, localParticipant: LocalParticipant, didPublish publication: LocalTrackPublication)  

room(_:​local​Participant:​did​Unpublish:​)

open func room(_ room: Room, localParticipant: LocalParticipant, didUnpublish publication: LocalTrackPublication)  

room(_:​participant:​did​Update:​permission:​)

open func room(_ room: Room, participant: RemoteParticipant, didUpdate publication: RemoteTrackPublication, permission allowed: Bool)