tencent cloud

Feedback

TUIRoomObserver

Last updated: 2024-12-20 15:06:46
    Copyright (c) 2024 Tencent. All rights reserved.
    Module: TUIRoomObserver @ TUIKitEngine.
    Function: TUIRoomEngine event callback APIs.
    
    TUIRoomObserver

    TUIRoomObserver

    FuncList
    DESC
    Error event callback.
    The current user was kicked offline.
    The current user signature is expired.
    The name of the room has changed.
    The status of disabling to open microphone has changed for all users.
    The status of disabling to open camera has changed for all users.
    The status of disabling to open screen sharing has changed for all users.
    The status of disabling to send message has changed for all users.
    Room was dismissed.
    The current user has been kicked off from the room.
    The room seat mode has changed.
    The count of user in the room has changed.
    The key-value of room metadata has changed.
    Remote user entered room.
    Remote user left room.
    User information has changed in the room.
    The status of the user has video stream changed.
    The status of the user has audio stream changed.
    User volume changed.
    The status of disabling to send message has changed for user.
    The user network status changed.
    Screen sharing stopped.
    The maximum count of seats in the room changed (only available in conference rooms)
    Seat list changed.
    The user was kicked off the seat.
    Receive a request message.
    Received a cancelled request.
    Receive a request to be processed by other administrator/owner.
    Local device added.
    Room was dismissed.
    User role changed.
    User role changed.
    Recevied user was kicked off the seat.
    Received a cancelled request.
    Receive a request to be processed by other administrator/owner.

    onError:message:

    onError:message:
    - (void)onError:
    (TUIError)errorCode
    message:
    (NSString *)message

    Error event callback.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Callback error events when entering a room or opening a device.
    Param
    DESC
    errorCode
    Error code. More details, see: TUIError.
    message
    Error message.

    onKickedOffLine:

    onKickedOffLine:
    - (void)onKickedOffLine:
    (NSString *)message

    The current user was kicked offline.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user is kicked offline.
    Param
    DESC
    message
    Description of being kicked off.

    onUserSigExpired

    onUserSigExpired

    The current user signature is expired.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's signature expires.

    onRoomNameChanged:roomName:

    onRoomNameChanged:roomName:
    - (void)onRoomNameChanged:
    (NSString *)roomId
    roomName:
    (NSString *)roomName

    The name of the room has changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the room name changes.
    Param
    DESC
    roomId
    Room ID.
    roomName
    Room name.

    onAllUserMicrophoneDisableChanged:isDisable:

    onAllUserMicrophoneDisableChanged:isDisable:
    - (void)onAllUserMicrophoneDisableChanged:
    (NSString *)roomId
    isDisable:
    (BOOL)isDisable

    The status of disabling to open microphone has changed for all users.

    Param
    DESC
    isDisable
    true: disable user to open microphone false: enable user to open microphone.
    roomId
    Room ID.
    Note
    The function only supports the TUIRoomTypeConference room type..
    Called when the microphone disable status changes for all users.

    onAllUserCameraDisableChanged:isDisable:

    onAllUserCameraDisableChanged:isDisable:
    - (void)onAllUserCameraDisableChanged:
    (NSString *)roomId
    isDisable:
    (BOOL)isDisable

    The status of disabling to open camera has changed for all users.

    Param
    DESC
    isDisable
    true: disable user to open camera false: enable user to open camera.
    roomId
    Room ID.
    Note
    The function only supports the TUIRoomTypeConference room type..
    Called when the camera disable status changes for all users.

    onScreenShareForAllUserDisableChanged:isDisable:

    onScreenShareForAllUserDisableChanged:isDisable:
    - (void)onScreenShareForAllUserDisableChanged:
    (NSString *)roomId
    isDisable:
    (BOOL)isDisable

    The status of disabling to open screen sharing has changed for all users.

    Param
    DESC
    isDisable
    true: disable user to open screen sharing false: enable user to open screen sharing.
    roomId
    Room ID.
    Note
    The function only supports the TUIRoomTypeConference room type..
    Called when the screen sharing permissions change for all users.

    onSendMessageForAllUserDisableChanged:isDisable:

    onSendMessageForAllUserDisableChanged:isDisable:
    - (void)onSendMessageForAllUserDisableChanged:
    (NSString *)roomId
    isDisable:
    (BOOL)isDisable

    The status of disabling to send message has changed for all users.

    Param
    DESC
    isDisable
    true: disable user to send message false: enable user to send message.
    roomId
    Room ID.
    Note
    The function only supports the TUIRoomTypeConference room type..
    Called when the message sending permissions change for all users.

    onRoomDismissed:reason:

    onRoomDismissed:reason:
    - (void)onRoomDismissed:
    (NSString *)roomId
    reason:

    Room was dismissed.

    Param
    DESC
    reason
    The reason why the room was dismissed. More details, see: TUIRoomDismissedReason.
    roomId
    Room ID.
    Note
    The function only supports the TUIRoomTypeConference room type..
    Called when the room is dismissed.

    onKickedOutOfRoom:reason:message:

    onKickedOutOfRoom:reason:message:
    - (void)onKickedOutOfRoom:
    (NSString *)roomId
    reason:
    message:
    (NSString *)message

    The current user has been kicked off from the room.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user is kicked out of the room.
    Param
    DESC
    message
    Description of being kicked off.
    reason
    Reason for being kicked off.
    roomId
    Room ID.

    onRoomSeatModeChanged:seatMode:

    onRoomSeatModeChanged:seatMode:
    - (void)onRoomSeatModeChanged:
    (NSString *)roomId
    seatMode:
    (TUISeatMode)seatMode

    The room seat mode has changed.

    Param
    DESC
    roomId
    : Room ID.
    seatMode
    : Seat mode. More details, see TUISeatMode.
    #### [REMARK]
    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the seat mode of the room changes.

    onRoomUserCountChanged:userCount:

    onRoomUserCountChanged:userCount:
    - (void)onRoomUserCountChanged:
    (NSString *)roomId
    userCount:
    (NSInteger)userCount

    The count of user in the room has changed.

    Param
    DESC
    roomId
    Room ID.
    userCount
    Count of user.
    #### [REMARK]
    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the user count of the room changes.

    onRoomMetadataChanged:value:

    onRoomMetadataChanged:value:
    - (void)onRoomMetadataChanged:
    (NSString *)key
    value:
    (NSString *)value

    The key-value of room metadata has changed.

    Param
    DESC
    key
    The key of room metadata.
    value
    The value of room metadata.
    #### [REMARK]
    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the custom information of the room changes.

    onRemoteUserEnterRoom:userInfo:

    onRemoteUserEnterRoom:userInfo:
    - (void)onRemoteUserEnterRoom:
    (NSString *)roomId
    userInfo:
    (TUIUserInfo *)userInfo

    Remote user entered room.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a remote user enters the room.
    Param
    DESC
    roomId
    Room ID.
    userInfo
    User information. More details, see TUIUserInfo.

    onRemoteUserLeaveRoom:userInfo:

    onRemoteUserLeaveRoom:userInfo:
    - (void)onRemoteUserLeaveRoom:
    (NSString *)roomId
    userInfo:
    (TUIUserInfo *)userInfo

    Remote user left room.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a remote user leaves the room.
    Param
    DESC
    roomId
    Room ID.
    userInfo
    User information. More details, see TUIUserInfo.

    onUserInfoChanged:modifyFlag:

    onUserInfoChanged:modifyFlag:
    - (void)onUserInfoChanged:
    (TUIUserInfo *)userInfo
    modifyFlag:
    (TUIUserInfoModifyFlag)modifyFlag

    User information has changed in the room.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's information changes.
    Param
    DESC
    modifyFlag
    Modifiable parameter. More details, see TUIUserInfoModifyFlag.
    userInfo
    User information. More details, see TUIUserInfo.

    onUserVideoStateChanged:streamType:hasVideo:reason:

    onUserVideoStateChanged:streamType:hasVideo:reason:
    - (void)onUserVideoStateChanged:
    (NSString *)userId
    streamType:
    (TUIVideoStreamType)streamType
    hasVideo:
    (BOOL)hasVideo
    reason:
    (TUIChangeReason)reason

    The status of the user has video stream changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's video state changes.
    Param
    DESC
    hasVideo
    The current user whether has video stream.
    reason
    The reason why the video stream changed: TUIChangeReasonBySelf: Changed by self TUIChangeReasonByAdmin: Changed by administrator.
    streamType
    Video stream type. More details, see TUIVideoStreamType.
    userId
    User ID.

    onUserAudioStateChanged:hasAudio:reason:

    onUserAudioStateChanged:hasAudio:reason:
    - (void)onUserAudioStateChanged:
    (NSString *)userId
    hasAudio:
    (BOOL)hasAudio
    reason:
    (TUIChangeReason)reason

    The status of the user has audio stream changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's audio state changes.
    Param
    DESC
    hasAudio
    The current user whether has audio stream.
    reason
    The reason why the video stream changed: TUIChangeReasonBySelf: Changed by self TUIChangeReasonByAdmin: Changed by administrator.
    userId
    User ID.

    onUserVoiceVolumeChanged

    onUserVoiceVolumeChanged

    User volume changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's voice volume changes.
    Param
    DESC
    volumeMap
    : User volume dictionary key: userId, value: the volume of all speaking users, with a value range of 0 - 100.

    onSendMessageForUserDisableChanged:userId:isDisable:

    onSendMessageForUserDisableChanged:userId:isDisable:
    - (void)onSendMessageForUserDisableChanged:
    (NSString *)roomId
    userId:
    (NSString *)userId
    isDisable:
    (BOOL)muted

    The status of disabling to send message has changed for user.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's message sending permissions change.
    Param
    DESC
    isDisable
    true: disable user to send message false: enable user to send message.
    userId
    User ID.

    onUserNetworkQualityChanged:

    onUserNetworkQualityChanged:
    - (void)onUserNetworkQualityChanged:
    (NSArray<TUINetworkInfo *> *)networkList

    The user network status changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's network quality changes.
    Param
    DESC
    networkList
    User network status list. More details, see TUINetworkInfo.

    onUserScreenCaptureStopped:

    onUserScreenCaptureStopped:
    - (void)onUserScreenCaptureStopped:
    (NSInteger)reason

    Screen sharing stopped.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's screen capture stops.
    Param
    DESC
    reason
    Stop reason, 0: user actively stops; 1: the screen or the window is closed ; 2: the status of the screen or the window has changed (such as device disconnect).

    onRoomMaxSeatCountChanged:maxSeatNumber:

    onRoomMaxSeatCountChanged:maxSeatNumber:
    - (void)onRoomMaxSeatCountChanged:
    (NSString *)roomId
    maxSeatNumber:
    (NSInteger)maxSeatNumber

    The maximum count of seats in the room changed (only available in conference rooms)

    Param
    DESC
    maxSeatCount
    The maximum count of seat in the room.
    roomId
    Room ID.

    onSeatListChanged:seated:left:

    onSeatListChanged:seated:left:
    - (void)onSeatListChanged:
    (NSArray<TUISeatInfo *> *)seatList
    seated:
    (NSArray<TUISeatInfo *> *)seatedList
    left:
    (NSArray<TUISeatInfo *> *)leftList

    Seat list changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the seat list changes.
    Param
    DESC
    leftList
    List of newly leave-seat users.
    seatList
    The latest user list on seat, including new users.
    seatedList
    List of newly take-seat users.

    onKickedOffSeat:operateUser:

    onKickedOffSeat:operateUser:
    - (void)onKickedOffSeat:
    (NSInteger)seatIndex
    operateUser:
    (TUIUserInfo *)operateUser

    The user was kicked off the seat.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user is kicked off a seat.
    Param
    DESC
    operateUser
    User information of the owner/administrator who kicked the user.
    seatIndex
    Seat index.

    onRequestReceived:

    onRequestReceived:
    - (void)onRequestReceived:
    (TUIRequest *)request

    Receive a request message.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a request is received.
    Param
    DESC
    request
    Request content. More details, see TUIRequest.

    onRequestCancelled:operateUser:

    onRequestCancelled:operateUser:
    - (void)onRequestCancelled:
    (TUIRequest *)request
    operateUser:
    (TUIUserInfo *)operateUser

    Received a cancelled request.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a request is cancelled.
    Param
    DESC
    operateUser
    Operator information.
    request
    Request content. More details, see TUIRequest.

    onRequestProcessed:operateUser:

    onRequestProcessed:operateUser:
    - (void)onRequestProcessed:
    (TUIRequest *)request
    operateUser:
    (TUIUserInfo *)operateUser

    Receive a request to be processed by other administrator/owner.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a request is processed.
    Param
    DESC
    operateUser
    Operator information.
    request
    Request content. More details, see TUIRequest.

    onDeviceChanged:type:state:

    onDeviceChanged:type:state:
    - (void)onDeviceChanged:
    (NSString *)deviceId
    type:
    (TUIMediaDeviceType)type
    state:
    (TUIMediaDeviceState)state

    Local device added.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a device changes.
    @deprecated It is not recommended to use it since version v2.0. It is recommended to use onDeviceChanged in {$TUIRoomDeviceManager$} instead.
    Param
    DESC
    deviceId
    Device ID.
    state
    0: the device has been added; 1: the device has been removed; 2: the device has been enabled.
    type
    Device type. More details, see TUIMediaDeviceType.
    Note
    When a local device (including camera, microphone, and speaker) is added, the SDK will throw this event callback.

    onRoomDismissed:

    onRoomDismissed:
    - (void)onRoomDismissed:
    (NSString *)roomId

    Room was dismissed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when the room is dismissed.
    @deprecated It is not recommended to use this function since version v2.3.0. It is recommended to use onRoomDismissed with TUIRoomDismissedReason instead.
    Param
    DESC
    roomId
    Room ID.
    Note
    This callback will be deleted in version v2.8.0. It is recommended that you use the new callback instead.

    onUserRoleChanged:

    onUserRoleChanged:
    - (void)onUserRoleChanged:
    (TUIUserInfo *)userInfo

    User role changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's role changes.
    Param
    DESC
    userInfo
    User information.

    onUserRoleChanged:userRole:

    onUserRoleChanged:userRole:
    - (void)onUserRoleChanged:
    (NSString *)userId
    userRole:
    (TUIRole)userRole

    User role changed.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user's role changes.
    @deprecated It is not recommended to use since version v2.3.0. It is recommended to use onUserRoleChanged with TUIUserInfo instead.
    Param
    DESC
    userId
    Room ID.
    userRole
    User roles. More details, see TUIRole.
    Note
    This callback will be deleted in version v2.8.0. It is recommended that you use the new callback instead.

    onKickedOffSeat:

    onKickedOffSeat:
    - (void)onKickedOffSeat:
    (NSString *)userId

    Recevied user was kicked off the seat.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a user is kicked off a seat.
    @deprecated It is not recommended to use since version v2.3.0. It is recommended to use onKickedOffSeat with TUIUserInfo instead.
    Param
    DESC
    userId
    Operator ID.
    Note
    This callback will be deleted in version v2.8.0. It is recommended that you use the new callback instead.

    onRequestCancelled:userId:

    onRequestCancelled:userId:
    - (void)onRequestCancelled:
    (NSString *)requestId
    userId:
    (NSString *)userId

    Received a cancelled request.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a request is cancelled.
    @deprecated It is not recommended to use since version v2.3.0. It is recommended to use onRequestCancelled with TUIRequest instead.
    Param
    DESC
    requestId
    Request ID.
    userId
    Operator ID.
    Note
    This callback will be deleted in version v2.8.0. It is recommended that you use the new callback instead.

    onRequestProcessed:userId:

    onRequestProcessed:userId:
    - (void)onRequestProcessed:
    (NSString *)requestId
    userId:
    (NSString *)userId

    Receive a request to be processed by other administrator/owner.

    The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
    Called when a request is processed.
    @deprecated It is not recommended to use since version v2.3.0. It is recommended to use onRequestProcessed with TUIRequest instead.
    Param
    DESC
    requestId
    Request ID.
    userId
    Operator ID.
    Note
    This callback will be deleted in version v2.8.0. It is recommended that you use the new callback instead.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support