RongIMLib View Markdown
    Preparing search index...

    Function bindRTCRoomForChatroom

    • 绑定音视频房间

      Parameters

      Returns Promise<RCResult<void>>

      聊天室与音视频房间绑定成功后,只要音视频房间仍存在,则阻止聊天室自动销毁 适用场景: 聊天室具有自动销毁机制。在使用融云 RTC 业务的 App 中,可能配合使用 IM SDK 的聊天室业务实现直播聊天、弹幕、属性记录等功能。 这种情况下,可以考虑将聊天室与音视频房间绑定,确保聊天室不会在语聊、直播结束前销毁,以免丢失关键数据。

      5.2.1

      绑定音视频房间示例:

      const option = {
      chatRoomId: 'chatroomId',
      rtcRoomId: 'rtcRoomId',
      };
      const res = await RongIMLib.bindRTCRoomForChatroom(option);
      console.log('绑定音视频房间结果:', res);