实时音视频

  • 实时音视频 > API 文档 > Windows >QNClientEventListener

    QNClientEventListener

    最近更新时间:2021-09-27 11:25:41

    QNRTCClient 事件回调接口
    Index
    Core Methods
    Core Methods
    OnVideoDeviceStateChanged
    • virtual void OnVideoDeviceStateChanged(QNVideoDeviceState deviceState, const std::string& deviceName) = 0
    • 摄像头插拔消息通知

      Parameters
    OnAudioDeviceStateChanged
    • virtual void OnAudioDeviceStateChanged(QNAudioDeviceState deviceState, const std::string& deviceGuid) = 0
    • 音频设备插拔消息通知

      Parameters
    OnConnectionStateChanged
    • virtual void OnConnectionStateChanged(QNConnectionState state, const QNConnectionDisconnectedInfo& info) = 0
    • 房间连接状态变化时通知

      Parameters
    OnUserJoined
    • virtual void OnUserJoined(const std::string& remoteUserID, const std::string& userData) = 0
    • 远端用户加入房间时通知

      Parameters
      • remoteUserID: string

        远端用户 id

      • userData: string

        远端用户自定义消息

    OnUserLeft
    • virtual void OnUserLeft(const std::string& remoteUserID) = 0
    • 远端用户离开房间时通知

      Parameters
      • remoteUserID: string

        远端用户 id

    OnUserReconnecting
    • virtual void OnUserReconnecting(const std::string& remoteUserID) = 0
    • 远端用户重连时通知

      Parameters
      • remoteUserID: string

        远端用户 id

    OnUserReconnected
    • virtual void OnUserReconnected(const std::string& remoteUserID) = 0
    • 远端用户重连成功时通知

      Parameters
      • remoteUserID: string

        远端用户 id

    OnUserPublished
    • virtual void OnUserPublished(const std::string& remoteUserID, const RemoteTrackList& trackList) = 0
    • 远端用户发布新 track 时通知

      Parameters
      • remoteUserID: string

        远端用户 id

      • trackList: std::list<shared_ptr<QNRemoteTrack>>

        远端用户新发布的 tracks

    OnUserUnpublished
    • virtual void OnUserUnpublished(const std::string& remoteUserID, const RemoteTrackList& trackList) = 0
    • 远端用户取消发布 track 时通知

      Parameters
      • remoteUserID: string

        远端用户 id

      • trackList: std::list<shared_ptr<QNRemoteTrack>>

        远端用户取消发布的 tracks

    OnSubscribed
    • virtual void OnSubscribed(const std::string& remoteUserID,const RemoteAudioTrackList& remoteAudioTracks,const RemoteVideoTrackList& remoteVideoTracks) = 0
    • 订阅 track 成功时通知

      Parameters
      • remoteUserID: string

        订阅的 track 所属的远端用户

      • remoteAudioTracks: std::list<shared_ptr<QNRemoteAudioTrack>>

        订阅的音频 tracks

      • remoteVideoTracks: std::list<shared_ptr<QNRemoteVideoTrack>>

        订阅的视频 tracks

    OnMessageReceived
    • virtual void OnMessageReceived(const CustomMessageList& message) = 0
    • 接收收到新的自定义消息时通知

      Parameters
    OnPreviewVideoFrame
    • virtual void OnPreviewVideoFrame(const unsigned char* data,int dataSize,int width,int height,QNVideoSourceType videoType) = 0
    • 摄像头和窗口捕获画面预览时数据回调

      Parameters
      • data: unsigned char*

        视频数据内存指针

      • dataSize: int

        数据长度

      • width: int

        视频宽

      • height: int

        视频高

      • videoType: QNVideoSourceType

        视频数据类型

    以上内容是否对您有帮助?
  • Qvm free helper
    Close