OdinRoomDelegate

public protocol OdinRoomDelegate: AnyObject

Methods

onRoomConnectionStateChanged(room:oldState:newState:reason:)

func onRoomConnectionStateChanged(
    room: OdinRoom,
    oldState: OdinRoomConnectionState,
    newState: OdinRoomConnectionState,
    reason: OdinRoomConnectionStateChangeReason
)

Callback for internal room connectivity state changes.

onRoomJoined(room:)

func onRoomJoined(
    room: OdinRoom
)

Callback for when a room was joined and the initial state is fully available.

onRoomUserDataChanged(room:)

func onRoomUserDataChanged(
    room: OdinRoom
)

Callback for room user data changes.

onPeerJoined(room:peer:)

func onPeerJoined(
    room: OdinRoom,
    peer: OdinPeer
)

Callback for peers joining the room.

onPeerUserDataChanged(room:peer:)

func onPeerUserDataChanged(
    room: OdinRoom,
    peer: OdinPeer
)

Callback for peer user data changes.

onPeerLeft(room:peer:)

func onPeerLeft(
    room: OdinRoom,
    peer: OdinPeer
)

Callback for peers leaving the room.

onMediaAdded(room:peer:media:)

func onMediaAdded(
    room: OdinRoom,
    peer: OdinPeer,
    media: OdinMedia
)

Callback for medias being added to the room.

onMediaActiveStateChanged(room:peer:media:)

func onMediaActiveStateChanged(
    room: OdinRoom,
    peer: OdinPeer,
    media: OdinMedia
)

Callback for media activity state changes.

onMediaRemoved(room:peer:media:)

func onMediaRemoved(
    room: OdinRoom,
    peer: OdinPeer,
    media: OdinMedia
)

Callback for medias being removed from the room.

onMessageReceived(room:senderId:data:)

func onMessageReceived(
    room: OdinRoom,
    senderId: UInt64,
    data: [UInt8]
)

Callback for incoming arbitrary data messages.