client-sdk-swift
client-sdk-swift copied to clipboard
Override RoomDelegate Methods in ObservableRoom
ObservableRoom is a subclass of RoomDelegate It has the following methods:
open func room(_ room: Room, didConnect isReconnect: Bool) {}
open func room(_ room: Room, didFailToConnect error: Error) {}
open func room(_ room: Room, didDisconnect error: Error?) {}
open func room(_ room: Room, didUpdate speakers: [Participant]) {}
open func room(_ room: Room, participant: Participant, didUpdate publication: TrackPublication, muted: Bool) {}
open func room(_ room: Room, participant: RemoteParticipant, didUpdate publication: RemoteTrackPublication, streamState: StreamState) {}
open func room(_ room: Room, participant: Participant, didUpdate connectionQuality: ConnectionQuality) {}
open func room(_ room: Room, participant: RemoteParticipant, didPublish publication: RemoteTrackPublication) {}
open func room(_ room: Room, participant: RemoteParticipant, didUnpublish publication: RemoteTrackPublication) {}
open func room(_ room: Room, participant: RemoteParticipant, didSubscribe publication: RemoteTrackPublication, track: Track) {}
open func room(_ room: Room, participant: RemoteParticipant, didFailToSubscribe trackSid: String, error: Error) {}
open func room(_ room: Room, participant: RemoteParticipant, didUnsubscribe publication: RemoteTrackPublication) {}
open func room(_ room: Room, participant: RemoteParticipant?, didReceive data: Data) {}
open func room(_ room: Room, localParticipant: LocalParticipant, didPublish publication: LocalTrackPublication) {}
open func room(_ room: Room, localParticipant: LocalParticipant, didUnpublish publication: LocalTrackPublication) {}
open func room(_ room: Room, participant: RemoteParticipant, didUpdate publication: RemoteTrackPublication, permission allowed: Bool) {}
ObservableRoom does not implement the method
func room(_ room: Room, didUpdate metadata: String?) {}
and therefore we can't override it in our own ObservableObject. This means we have no way of handling updates to metadata. Adding the method to ObservableRoom will fix the Issue.