100ms Logo

100ms

Docs

Search docs
/

HMSDataSource

EXTENSION

extension HMSDataSource: HMSUpdateListener

Methods

on(join:)

public func on(join room: HMSRoom)

initializes data source with current peers & tracks in the room

  • Parameter room: the room which the user joined

Parameters

NameDescription
roomthe room which the user joined

on(room:update:)

public func on(room: HMSRoom, update: HMSRoomUpdate)

Parameters

NameDescription
roomthe room which was joined
updatethe triggered update type. Should be used to perform different UI Actions

on(peer:update:)

public func on(peer: HMSPeer, update: HMSPeerUpdate)

Parameters

NameDescription
peerthe peer who joined/left or was updated
updatethe triggered update type. Should be used to perform different UI Actions

on(track:update:for:)

public func on(track: HMSTrack, update: HMSTrackUpdate, for peer: HMSPeer)

Parameters

NameDescription
trackthe track which was added, removed or updated
updatethe triggered update type
peerthe peer for which track was added, removed or updated

on(updated:)

public func on(updated speakers: [HMSSpeaker])

Parameters

NameDescription
speakersthe list of speakers

on(error:)

public func on(error: HMSError)

Parameters

NameDescription
errorthe error that occurred

on(message:)

public func on(message: HMSMessage)

Parameters

NameDescription
messagethe received broadcast message

onReconnecting()

public func onReconnecting()

onReconnected()

public func onReconnected()

Have a suggestion? Recommend changes ->

Was this helpful?

1234