函数 | |
delegate void | RtcTakeSnapshotCallback (RtcErrorCode errorCode, string image) |
delegate void | OnError (int errorCode, string msg) |
delegate void | OnWarning (int warnCode, string msg) |
delegate void | OnAPICallExecuted (string apiName, RtcErrorCode errorCode, string msg) |
delegate void | OnJoinChannel (ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | OnReconnectingStart (ulong cid, ulong uid) |
delegate void | OnConnectionStateChanged (RtcConnectionStateType state, RtcReasonConnectionChangedType reason) |
delegate void | OnNetworkTypeChanged (RtcNetworkType newType) |
delegate void | OnRejoinChannel (ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | OnLeaveChannel (RtcErrorCode result) |
delegate void | OnDisconnect (RtcErrorCode reason) |
delegate void | OnClientRoleChanged (RtcClientRole oldRole, RtcClientRole newRole) |
delegate void | OnUserJoined (ulong uid, string userName, RtcUserJoinExtraInfo customInfo) |
delegate void | OnUserLeft (ulong uid, RtcSessionLeaveReason reason, RtcUserJoinExtraInfo customInfo) |
delegate void | OnUserAudioStart (RtcAudioStreamType type, ulong uid) |
delegate void | OnUserAudioStop (RtcAudioStreamType type, ulong uid) |
delegate void | OnUserVideoStart (RtcVideoStreamType type, ulong uid, RtcVideoProfileType maxProfile) |
delegate void | OnUserVideoStop (RtcVideoStreamType type, ulong uid) |
delegate void | OnScreenCaptureStatusChanged (RtcScreenCaptureStatus status) |
delegate void | OnUserVideoProfileUpdate (ulong uid, RtcVideoProfileType maxProfile) |
delegate void | OnUserAudioMute (RtcAudioStreamType type, ulong uid, bool mute) |
delegate void | OnUserVideoMute (RtcVideoStreamType type, ulong uid, bool mute) |
delegate void | OnAudioDeviceRoutingDidChange (RtcAudioOutputRouting routing) |
delegate void | OnAudioDeviceStateChanged (string deviceId, RtcAudioDeviceType deviceType, RtcAudioDeviceState deviceState) |
delegate void | OnAudioDefaultDeviceChanged (string deviceId, RtcAudioDeviceType deviceType) |
delegate void | OnVideoDeviceStateChanged (string deviceId, RtcVideoDeviceType deviceType, RtcVideoDeviceState deviceState) |
delegate void | OnCameraFocusChanged (RtcCameraFocusAndExposureInfo info) |
delegate void | OnCameraExposureChanged (RtcCameraFocusAndExposureInfo info) |
delegate void | OnFirstAudioDataReceived (RtcAudioStreamType type, ulong uid) |
delegate void | OnFirstVideoDataReceived (RtcVideoStreamType type, ulong uid) |
delegate void | OnRemoteVideoReceiveSizeChanged (ulong uid, RtcVideoStreamType type, uint width, uint height) |
delegate void | OnLocalVideoRenderSizeChanged (RtcVideoStreamType type, uint width, uint height) |
delegate void | OnFirstAudioFrameDecoded (RtcAudioStreamType type, ulong uid) |
delegate void | OnFirstVideoFrameDecoded (RtcVideoStreamType type, ulong uid, uint width, uint height) |
delegate void | OnAudioMixingStateChanged (RtcAudioMixingState state, RtcAudioMixingErrorCode errorCode) |
delegate void | OnAudioMixingTimestampUpdate (ulong timestampMS) |
delegate void | OnAudioEffectTimestampUpdate (uint effectId, ulong timestamp) |
delegate void | OnAudioEffectFinished (uint effectId) |
delegate void | OnLocalAudioVolumeIndication (int volume, bool enableVad) |
delegate void | OnRemoteAudioVolumeIndication (RtcAudioVolumeInfo[] speakers, int totalVolume) |
delegate void | OnAddLiveStreamTask (string taskId, string url, int errorCode) |
delegate void | OnUpdateLiveStreamTask (string taskId, string url, int errorCode) |
delegate void | OnRemoveLiveStreamTask (string taskId, int errorCode) |
delegate void | OnLiveStreamStateChanged (string taskId, string url, RtcLiveStreamStateCode state) |
delegate void | OnAudioHowling (bool howling) |
delegate void | OnRecvSEIMessage (ulong uid, byte[] data, uint dataSize) |
delegate void | OnAudioRecording (RtcAudioRecordingCode code, string filePath) |
delegate void | OnMediaRelayStateChanged (RtcChannelMediaRelayState state, string channelName) |
delegate void | OnMediaRelayEvent (RtcChannelMediaRelayEvent evt, string channelName, RtcErrorCode error) |
delegate void | OnPublishFallbackToAudioOnly (bool isFallback, RtcVideoStreamType streamType) |
delegate void | OnSubscribeFallbackToAudioOnly (ulong uid, bool isFallback, RtcVideoStreamType streamType) |
delegate void | OnLastmileQuality (RtcNetworkQualityType quality) |
delegate void | OnLastmileProbeResult (RtcLastmileProbeResult result) |
delegate void | OnMediaRightChanged (bool audioBanned, bool videoBanned) |
delegate void | OnCheckNECastAudioDriverResult (RtcInstallCastAudioDriverResult result) |
delegate void | OnVirtualBackgroundSourceEnabled (bool enabled, RtcVirtualBackgroundSourcStateReason reason) |
delegate void | OnLocalVideoWatermarkState (RtcVideoStreamType type, RtcLocalVideoWatermarkState state) |
delegate void | OnPermissionKeyWillExpire () |
delegate void | OnUpdatePermissionKey (string key, RtcErrorCode error, int timeout) |
delegate void | OnUserDataReceiveMessage (ulong uid, string sourceId, byte[] data) |
delegate void | OnUserDataStart (ulong uid) |
delegate void | OnUserDataStop (ulong uid) |
delegate void | OnUserDataStateChanged (ulong uid, string sourceId) |
delegate void | OnUserDataBufferedAmountChanged (ulong uid, string sourceId, ulong previousAmount) |
delegate void | ChannelOnError (IRtcChannel channel, int errorCode, string msg) |
delegate void | ChannelOnWarning (IRtcChannel channel, int warnCode, string msg) |
delegate void | ChannelOnAPICallExecuted (IRtcChannel channel, string apiName, RtcErrorCode errorCode, string msg) |
delegate void | ChannelOnJoinChannel (IRtcChannel channel, ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | ChannelOnReconnectingStart (IRtcChannel channel, ulong cid, ulong uid) |
delegate void | ChannelOnConnectionStateChanged (IRtcChannel channel, RtcConnectionStateType state, RtcReasonConnectionChangedType reason) |
delegate void | ChannelOnRejoinChannel (IRtcChannel channel, ulong cid, ulong uid, RtcErrorCode result, ulong elapsed) |
delegate void | ChannelOnLeaveChannel (IRtcChannel channel, RtcErrorCode result) |
delegate void | ChannelOnDisconnect (IRtcChannel channel, RtcErrorCode reason) |
delegate void | ChannelOnClientRoleChanged (IRtcChannel channel, RtcClientRole oldRole, RtcClientRole newRole) |
delegate void | ChannelOnUserJoined (IRtcChannel channel, ulong uid, string userName, RtcUserJoinExtraInfo customInfo) |
delegate void | ChannelOnUserLeft (IRtcChannel channel, ulong uid, RtcSessionLeaveReason reason, RtcUserJoinExtraInfo customInfo) |
delegate void | ChannelOnUserAudioStart (IRtcChannel channel, RtcAudioStreamType type, ulong uid) |
delegate void | ChannelOnUserAudioStop (IRtcChannel channel, RtcAudioStreamType type, ulong uid) |
delegate void | ChannelOnUserAudioMute (IRtcChannel channel, RtcAudioStreamType type, ulong uid, bool mute) |
delegate void | ChannelOnUserVideoStart (IRtcChannel channel, RtcVideoStreamType type, ulong uid, RtcVideoProfileType maxProfile) |
delegate void | ChannelOnUserVideoStop (IRtcChannel channel, RtcVideoStreamType type, ulong uid) |
delegate void | ChannelOnUserVideoMute (IRtcChannel channel, RtcVideoStreamType type, ulong uid, bool mute) |
delegate void | ChannelOnScreenCaptureStatusChanged (IRtcChannel channel, RtcScreenCaptureStatus status) |
delegate void | ChannelOnUserVideoProfileUpdate (IRtcChannel channel, ulong uid, RtcVideoProfileType maxProfile) |
delegate void | ChannelOnFirstAudioDataReceived (IRtcChannel channel, RtcAudioStreamType type, ulong uid) |
delegate void | ChannelOnFirstVideoDataReceived (IRtcChannel channel, RtcVideoStreamType type, ulong uid) |
delegate void | ChannelOnRemoteVideoReceiveSizeChanged (ulong uid, RtcVideoStreamType type, uint width, uint height) |
delegate void | ChannelOnLocalVideoRenderSizeChanged (RtcVideoStreamType type, uint width, uint height) |
delegate void | ChannelOnFirstAudioFrameDecoded (IRtcChannel channel, RtcAudioStreamType type, ulong uid) |
delegate void | ChannelOnFirstVideoFrameDecoded (IRtcChannel channel, RtcVideoStreamType type, ulong uid, uint width, uint height) |
delegate void | ChannelOnLocalAudioVolumeIndication (IRtcChannel channel, int volume, bool enableVad) |
delegate void | ChannelOnRemoteAudioVolumeIndication (IRtcChannel channel, RtcAudioVolumeInfo[] speakers, int totalVolume) |
delegate void | ChannelOnAddLiveStreamTask (IRtcChannel channel, string taskId, string url, int errorCode) |
delegate void | ChannelOnUpdateLiveStreamTask (IRtcChannel channel, string taskId, string url, int errorCode) |
delegate void | ChannelOnRemoveLiveStreamTask (IRtcChannel channel, string taskId, int errorCode) |
delegate void | ChannelOnLiveStreamStateChanged (IRtcChannel channel, string taskId, string url, RtcLiveStreamStateCode state) |
delegate void | ChannelOnRecvSEIMessage (IRtcChannel channel, ulong uid, byte[] data, uint dataSize) |
delegate void | ChannelOnMediaRelayStateChanged (IRtcChannel channel, RtcChannelMediaRelayState state, string channelName) |
delegate void | ChannelOnMediaRelayEvent (IRtcChannel channel, RtcChannelMediaRelayEvent evt, string channelName, RtcErrorCode error) |
delegate void | ChannelOnPublishFallbackToAudioOnly (IRtcChannel channel, bool isFallback, RtcVideoStreamType streamType) |
delegate void | ChannelOnSubscribeFallbackToAudioOnly (IRtcChannel channel, ulong uid, bool isFallback, RtcVideoStreamType streamType) |
delegate void | ChannelOnMediaRightChanged (IRtcChannel channel, bool audioBanned, bool videoBanned) |
delegate void | ChannelOnPermissionKeyWillExpire (IRtcChannel channel) |
delegate void | ChannelOnUpdatePermissionKey (IRtcChannel channel, string key, RtcErrorCode errorCode, int timeout) |
|
strong |
|
strong |
错误代码。
错误代码意味着 SDK 遇到不可恢复的错误,需要应用程序干预。
|
strong |
混音音乐文件错误码。
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
音频属性。设置采样率,码率,编码模式和声道数。
|
strong |
音频应用场景。不同的场景设置对应不同的音频采集模式、播放模式。
|
strong |
|
strong |
预设的美声效果
|
strong |
音效均衡波段的中心频率
|
strong |
视频编码配置。用于衡量编码质量。
|
strong |
|
strong |
|
strong |
音频设备类型状态。
|
strong |
音频设备连接类型。
|
strong |
|
strong |
|
strong |
视频设备类型状态。
|
strong |
|
strong |
|
strong |
视频旋转的方向模式。
|
strong |
|
strong |
连接状态变更原因
|
strong |
|
strong |
网络质量类型。
|
strong |
|
strong |
|
strong |
视频编码策略。
|
strong |
|
strong |
|
strong |
屏幕分享状态
|
strong |
屏幕共享功能的编码策略倾向。
枚举值 | |
---|---|
kNERtcSubStreamContentPreferMotion | 动画模式。 |
kNERtcSubStreamContentPreferDetails | 细节模式。 |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
音乐文件播放状态。
枚举值 | |
---|---|
kNERtcAudioMixingStateFinished | 音乐文件播放结束。 |
kNERtcAudioMixingStateFailed | 音乐文件报错。详见: RtcAudioMixingErrorCode |
|
strong |
|
strong |
媒体流转发状态
|
strong |
媒体流转发回调事件。
|
strong |
视频水印状态。
|
strong |
|
strong |
日志级别。
|
strong |
|
strong |
|
strong |
|
strong |
录音缓存时长
|
strong |
|
strong |
上行、下行弱网时的回退选项。
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
虚拟背景未成功启用的原因或确认成功的信息。
枚举值 | |
---|---|
kNERtcVirtualBackgroundSourceStateReasonSuccess | 0: 虚拟背景开启成功。 |
kNERtcVirtualBackgroundSourceStateReasonImageNotExist | 1:自定义背景图片不存在。 请检查 RtcVirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonImageFormatNotSupported | 2:自定义背景图片的图片格式无效。 请检查 VirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonColorFormatNotSupported | 3:自定义背景图片的颜色格式无效。 请检查 RtcVirtualBackgroundSource 中 |
kNERtcVirtualBackgroundSourceStateReasonDeviceNotSupported | 4:该设备不支持使用虚拟背景。 |
|
strong |
|
strong |
|
strong |
|
strong |
美颜类型。
|
strong |
|
strong |
空间音效中房间材质名称
|
strong |
|
strong |
|
strong |
音频设备错误码
|
strong |
|
strong |
|
strong |
网络类型
|
strong |
音频会话控制权限(iOS only)。
SDK 对 Audio Session 的控制权限。
|
strong |
|
strong |
delegate void nertc.RtcTakeSnapshotCallback | ( | RtcErrorCode | errorCode, |
string | image | ||
) |
截图结果回调。
errorCode | 错误码。详细信息请参考 RtcErrorCode。 |
image | 截图图片。图片文件所在路径。 |
delegate void nertc.OnError | ( | int | errorCode, |
string | msg | ||
) |
发生错误回调。
该回调方法表示 SDK 运行时出现了(网络或媒体相关的)错误。通常情况下,SDK上报的错误意味着SDK无法自动恢复,需要 App 干预或提示用户。
errorCode | 错误码。详细信息请参考 RtcErrorCode |
msg | 错误描述。 |
delegate void nertc.OnWarning | ( | int | warnCode, |
string | msg | ||
) |
发生警告回调。
该回调方法表示 SDK 运行时出现了(网络或媒体相关的)警告。通常情况下,SDK 上报的警告信息 App 可以忽略,SDK 会自动恢复。
warnCode | 警告码。详细信息请参考 RtcWarnCode。 |
msg | 警告描述。 |
delegate void nertc.OnAPICallExecuted | ( | string | apiName, |
RtcErrorCode | errorCode, | ||
string | msg | ||
) |
API调用结束回调。
该回调方法表示 SDK 执行完了一个用户的API调用。
apiName | API名称 |
errorCode | API执行结果错误码。 |
msg | API执行结果描述。 |
delegate void nertc.OnJoinChannel | ( | ulong | cid, |
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
加入房间回调,表示客户端已经登入服务器。
cid | 客户端加入的房间 ID。 |
uid | 用户 ID。 如果在 IRtcEngine.JoinChannel 方法中指定了 uid,此处会返回指定的 ID; 如果未指定 uid,此处将返回云信服务器自动分配的 ID。 |
result | 返回结果。 |
elapsed | 从 IRtcEngine.JoinChannel 开始到发生此事件过去的时间,单位为毫秒。 |
delegate void nertc.OnReconnectingStart | ( | ulong | cid, |
ulong | uid | ||
) |
触发重连。
有时候由于网络原因,客户端可能会和服务器失去连接,SDK会进行自动重连,开始自动重连后触发此回调。
cid | 房间 ID。 |
uid | 用户 ID。 |
delegate void nertc.OnConnectionStateChanged | ( | RtcConnectionStateType | state, |
RtcReasonConnectionChangedType | reason | ||
) |
网络连接状态已改变回调。
该回调在网络连接状态发生改变的时候触发,并告知用户当前的网络连接状态和引起网络状态改变的原因。
state | 当前的网络连接状态。 |
reason | 引起当前网络连接状态发生改变的原因。 |
delegate void nertc.OnNetworkTypeChanged | ( | RtcNetworkType | newType | ) |
网络类型已经改变的回调。
该回调在网络发生改变的时候触发,并告知用户当前的网络类型。
newType | 当前的网络类型。 |
delegate void nertc.OnRejoinChannel | ( | ulong | cid, |
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
重新加入房间回调。
在弱网环境下,若客户端和服务器失去连接,SDK会自动重连。自动重连成功后触发此回调方法。
cid | 客户端加入的房间 ID。 |
uid | 用户 ID。 |
result | 返回结果。 |
elapsed | 从开始重连到发生此事件过去的时间,单位为毫秒。 |
delegate void nertc.OnLeaveChannel | ( | RtcErrorCode | result | ) |
退出房间回调。
App 调用 IRtcEngine.LeaveChannel 方法后,SDK 提示 App 退出房间是否成功。
result | 返回结果。 |
delegate void nertc.OnDisconnect | ( | RtcErrorCode | reason | ) |
网络连接中断
reason | 网络连接中断原因。 |
delegate void nertc.OnClientRoleChanged | ( | RtcClientRole | oldRole, |
RtcClientRole | newRole | ||
) |
直播场景下用户角色已切换回调。
本地用户加入房间后,通过 IRtcEngine.SetClientRole 切换用户角色后会触发此回调。例如主播切换为观众、从观众切换为主播。
oldRole | 切换前的角色。 |
newRole | 切换后的角色。 |
delegate void nertc.OnUserJoined | ( | ulong | uid, |
string | userName, | ||
RtcUserJoinExtraInfo | customInfo | ||
) |
远端用户加入当前房间回调。
该回调提示有远端用户加入了房间,并返回新加入用户的 ID;如果加入之前,已经有其他用户在房间中了,新加入的用户也会收到这些已有用户加入房间的回调。
uid | 新加入房间的远端用户 ID。 |
userName | 新加入房间的远端用户名。 |
customInfo | 该远端用户加入的额外信息。 |
delegate void nertc.OnUserLeft | ( | ulong | uid, |
RtcSessionLeaveReason | reason, | ||
RtcUserJoinExtraInfo | customInfo | ||
) |
远端用户离开当前房间的回调。
提示有远端用户离开了房间(或掉线)。通常情况下,用户离开房间有两个原因,即正常离开和超时掉线:
uid | 离开房间的远端用户 ID。 |
reason | 远端用户离开原因。 |
customInfo | 该远端用户离开的额外信息。 |
delegate void nertc.OnUserAudioStart | ( | RtcAudioStreamType | type, |
ulong | uid | ||
) |
远端用户开启音频的回调。
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.OnUserAudioStop | ( | RtcAudioStreamType | type, |
ulong | uid | ||
) |
远端用户停用音频的回调。
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.OnUserVideoStart | ( | RtcVideoStreamType | type, |
ulong | uid, | ||
RtcVideoProfileType | maxProfile | ||
) |
远端用户开启视频的回调。
uid | 远端用户ID。 |
type | 远端用户流类型。 |
maxProfile | 视频编码的分辨率,用于衡量编码质量。 |
delegate void nertc.OnUserVideoStop | ( | RtcVideoStreamType | type, |
ulong | uid | ||
) |
远端用户停用视频的回调。
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.OnScreenCaptureStatusChanged | ( | RtcScreenCaptureStatus | status | ) |
delegate void nertc.OnUserVideoProfileUpdate | ( | ulong | uid, |
RtcVideoProfileType | maxProfile | ||
) |
uid | 远端用户 ID。 |
maxProfile | 视频编码的分辨率,用于衡量编码质量。 |
delegate void nertc.OnUserAudioMute | ( | RtcAudioStreamType | type, |
ulong | uid, | ||
bool | mute | ||
) |
远端用户是否静音的回调。
type | 音频流类型。 |
uid | 远端用户ID。 |
mute | 是否静音。 |
delegate void nertc.OnUserVideoMute | ( | RtcVideoStreamType | type, |
ulong | uid, | ||
bool | mute | ||
) |
远端用户暂停或恢复发送视频流的回调。
type | 视频流类型。 |
uid | 远端用户ID。 |
mute | 是否禁视频流。 |
delegate void nertc.OnAudioDeviceRoutingDidChange | ( | RtcAudioOutputRouting | routing | ) |
音频路由变化回调。
routing | 当前音频输出路由。 |
delegate void nertc.OnAudioDeviceStateChanged | ( | string | deviceId, |
RtcAudioDeviceType | deviceType, | ||
RtcAudioDeviceState | deviceState | ||
) |
音频设备状态更改的回调。
deviceId | 设备ID。 |
deviceType | 音频设备类型。详细信息请参考 RtcAudioDeviceType 。 |
deviceState | 音频设备状态。 |
delegate void nertc.OnAudioDefaultDeviceChanged | ( | string | deviceId, |
RtcAudioDeviceType | deviceType | ||
) |
音频默认设备更改的回调。
deviceId | 设备ID。 |
deviceType | 音频设备类型。 |
delegate void nertc.OnVideoDeviceStateChanged | ( | string | deviceId, |
RtcVideoDeviceType | deviceType, | ||
RtcVideoDeviceState | deviceState | ||
) |
视频设备状态已改变的回调。
deviceId | 设备ID。 |
deviceType | 视频设备类型。 |
deviceState | 视频设备状态。 |
delegate void nertc.OnCameraFocusChanged | ( | RtcCameraFocusAndExposureInfo | info | ) |
摄像头对焦区域已改变回调。 该回调表示相机的对焦区域发生了改变。 该回调是由本地用户调用 IRtcEngine.SetCameraFocusPosition 方法改变对焦位置触发的。
info | 新的对焦区域位置。 |
delegate void nertc.OnCameraExposureChanged | ( | RtcCameraFocusAndExposureInfo | info | ) |
摄像头曝光区域已改变回调。 该回调是由本地用户调用 IRtcEngine.SetCameraExposurePosition 方法改变曝光位置触发的。
info | 新的曝光区域位置信息。 |
delegate void nertc.OnFirstAudioDataReceived | ( | RtcAudioStreamType | type, |
ulong | uid | ||
) |
已接收到远端音频首帧的回调。
type | 音频流类型。 |
uid | 远端用户 ID,指定是哪个用户的音频流。 |
delegate void nertc.OnFirstVideoDataReceived | ( | RtcVideoStreamType | type, |
ulong | uid | ||
) |
已显示首帧远端视频的回调。 第一帧远端视频显示在视图上时,触发此调用。
type | 视频流类型。 |
uid | 用户 ID,指定是哪个用户的视频流。 |
delegate void nertc.OnRemoteVideoReceiveSizeChanged | ( | ulong | uid, |
RtcVideoStreamType | type, | ||
uint | width, | ||
uint | height | ||
) |
接收的远端视频分辨率变化回调。
当远端用户视频流的分辨率发生变化时,会触发此回调。 例如推流端调用 SetVideoConfig 更改了编码分辨率设置,本地会收到该远端用户分辨率变化通知。
uid | 用户 ID,指定是哪个用户的视频流。 |
type | 视频通道类型:kNERTCVideoStreamMain:主流。 kNERtcVideoStreamSub:辅流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.OnLocalVideoRenderSizeChanged | ( | RtcVideoStreamType | type, |
uint | width, | ||
uint | height | ||
) |
本地视频预览的分辨率变化回调, 与是否进入房间的状态无关,与硬件状态有关,也适用于预览
当本地视频的分辨率发生变化,会触发此回调。当调用 SetCaptureConfig 设置采集分辨率或调用 SetVideoConfig 设置编码属性时可以触发该回调。 回调的分辨率宽和高为本地预览的宽和高,和实际编码发送的分辨率不一定一致。
type | 视频通道类型:kNERTCVideoStreamMain:主流。 kNERtcVideoStreamSub:辅流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.OnFirstAudioFrameDecoded | ( | RtcAudioStreamType | type, |
ulong | uid | ||
) |
已解码远端音频首帧的回调。
type | 音频流类型。 |
uid | 远端用户 ID,指定是哪个用户的音频流。 |
delegate void nertc.OnFirstVideoFrameDecoded | ( | RtcVideoStreamType | type, |
ulong | uid, | ||
uint | width, | ||
uint | height | ||
) |
已接收到远端视频并完成解码的回调。
引擎收到第一帧远端视频流并解码成功时,触发此调用。
type | 视频流类型。 |
uid | 用户 ID,指定是哪个用户的视频流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.OnAudioMixingStateChanged | ( | RtcAudioMixingState | state, |
RtcAudioMixingErrorCode | errorCode | ||
) |
本地用户的音乐文件播放状态改变回调。
调用 startAudioMixing 播放混音音乐文件后,当音乐文件的播放状态发生改变时,会触发该回调。
state | 音乐文件播放状态,详见 RtcAudioMixingState 。 |
errorCode | 错误码,详见 RtcAudioMixingErrorCode 。 |
delegate void nertc.OnAudioMixingTimestampUpdate | ( | ulong | timestampMS | ) |
本地用户的音乐文件播放进度回调。
调用 IRtcEngine.StartAudioMixing 播放混音音乐文件后,当音乐文件的播放进度改变时,会触发该回调。
timestampMS | 音乐文件播放进度,单位为毫秒 |
delegate void nertc.OnAudioEffectTimestampUpdate | ( | uint | effectId, |
ulong | timestamp | ||
) |
本地用户的指定音效文件播放进度回调。
参数名称 | 类型 | 描述 |
---|---|---|
effectId | uint | 指定音效文件的 ID。每个音效均有唯一的 ID。 |
timestamp | ulong | 指定音效文件的当前播放进度。单位为毫秒。 |
delegate void nertc.OnAudioEffectFinished | ( | uint | effectId | ) |
本地音效文件播放已结束回调。
当播放音效结束后,会触发该回调。
effectId | 指定音效的 ID。每个音效均有唯一的 ID。 |
delegate void nertc.OnLocalAudioVolumeIndication | ( | int | volume, |
bool | enableVad | ||
) |
提示房间内本地用户瞬时音量的回调。
volume | (混音后的)音量,取值范围为 [0,100]。 |
enableVad | 是否检测到人声。 |
delegate void nertc.OnRemoteAudioVolumeIndication | ( | RtcAudioVolumeInfo[] | speakers, |
int | totalVolume | ||
) |
提示房间内谁正在说话及说话者瞬时音量的回调。
该回调默认为关闭状态。可以通过 IRtcEngine.EnableAudioVolumeIndication 方法开启。开启后,无论房间内是否有人说话,SDK 都会按 IRtcEngine.EnableAudioVolumeIndication 方法中设置的时间间隔触发该回调。
在返回的 speakers 数组中:
speakers | 每个说话者的用户 ID 和音量信息的数组: RtcAudioVolumeInfo |
totalVolume | (混音后的)总音量,取值范围为 [0,100]。 |
delegate void nertc.OnAddLiveStreamTask | ( | string | taskId, |
string | url, | ||
int | errorCode | ||
) |
通知添加直播任务结果。
该回调异步返回 IRtcEngine.AddLiveStreamTask 接口的调用结果;实际推流状态参考 OnLiveStreamStateChanged
taskId | 任务id |
url | 推流地址 |
errorCode | 结果
|
delegate void nertc.OnUpdateLiveStreamTask | ( | string | taskId, |
string | url, | ||
int | errorCode | ||
) |
通知更新直播任务结果。 该回调异步返回 IRtcEngine.UpdateLiveStreamTask 接口的调用结果;实际推流状态参考 OnLiveStreamStateChanged
taskId | 任务id |
url | 推流地址 |
errorCode | 结果
|
delegate void nertc.OnRemoveLiveStreamTask | ( | string | taskId, |
int | errorCode | ||
) |
通知删除直播任务结果。
该回调异步返回 IRtcEngine.RemoveLiveStreamTask 接口的调用结果;实际推流状态参考 OnLiveStreamStateChanged
taskId | 任务id |
errorCode | 结果
|
delegate void nertc.OnLiveStreamStateChanged | ( | string | taskId, |
string | url, | ||
RtcLiveStreamStateCode | state | ||
) |
通知直播推流状态
taskId | 任务id |
url | 推流地址 |
state | RtcLiveStreamStateCode, 直播推流状态
|
delegate void nertc.OnAudioHowling | ( | bool | howling | ) |
检测到啸叫回调。
当声源与扩音设备之间因距离过近时,可能会产生啸叫。NERTC SDK 支持啸叫检测,当检测到有啸叫信号产生的时候,自动触发该回调直至啸叫停止。App 应用层可以在收到啸叫回调时,提示用户静音麦克风,或直接静音麦克风。
howling | 是否出现啸叫
|
delegate void nertc.OnRecvSEIMessage | ( | ulong | uid, |
byte[] | data, | ||
uint | dataSize | ||
) |
收到远端流的 SEI 内容回调。
当远端成功发送 SEI 后,本端会收到此回调。
[in] | uid | 发送该 sei 的用户 id |
[in] | data | 接收到的 sei 数据 |
[in] | dataSize | 接收到 sei 数据的大小 |
delegate void nertc.OnAudioRecording | ( | RtcAudioRecordingCode | code, |
string | filePath | ||
) |
音频录制状态回调。
code | 音频录制状态码。详细信息请参考 RtcAudioRecordingCode 。 |
filePath | 音频录制文件保存路径。 |
delegate void nertc.OnMediaRelayStateChanged | ( | RtcChannelMediaRelayState | state, |
string | channelName | ||
) |
跨房间媒体流转发状态发生改变回调。
state | 当前跨房间媒体流转发状态。详细信息请参考 RtcChannelMediaRelayState |
channelName | 媒体流转发的目标房间名。 |
delegate void nertc.OnMediaRelayEvent | ( | RtcChannelMediaRelayEvent | evt, |
string | channelName, | ||
RtcErrorCode | error | ||
) |
媒体流相关转发事件回调。
evt | 当前媒体流转发事件。详细信息请参考 RtcChannelMediaRelayEvent 。 |
channelName | 转发的目标房间名。 |
error | 相关错误码。详细信息请参考 RtcErrorCode 。 |
delegate void nertc.OnPublishFallbackToAudioOnly | ( | bool | isFallback, |
RtcVideoStreamType | streamType | ||
) |
本地发布流已回退为音频流、或已恢复为音视频流回调。
如果您调用了设置本地推流回退选项 IRtcEngine.SetLocalPublishFallbackOption 接口,并将 option 设置为 kNERtcStreamFallbackAudioOnly 后,当上行网络环境不理想、本地发布的媒体流回退为音频流时,或当上行网络改善、媒体流恢复为音视频流时,会触发该回调。
isFallback | 本地发布流已回退或已恢复。
|
streamType | 对应的视频流类型,即主流或辅流。 |
delegate void nertc.OnSubscribeFallbackToAudioOnly | ( | ulong | uid, |
bool | isFallback, | ||
RtcVideoStreamType | streamType | ||
) |
订阅的远端流已回退为音频流、或已恢复为音视频流回调。
如果你调用了设置远端订阅流回退选项 IRtcEngine.SetRemoteSubscribeFallbackOption 接口并将 option 设置 kNERtcStreamFallbackAudioOnly 后,当下行网络环境不理想、仅接收远端音频流时,或当下行网络改善、恢复订阅音视频流时,会触发该回调。
uid | 远端用户的 ID。 |
isFallback | 远端订阅流已回退或恢复:
|
streamType | 对应的视频流类型,即主流或辅流。 |
delegate void nertc.OnLastmileQuality | ( | RtcNetworkQualityType | quality | ) |
通话前网络上下行 last mile 质量状态回调。
该回调描述本地用户在加入房间前的 last mile 网络探测的结果,以打分形式描述上下行网络质量的主观体验,您可以通过该回调预估本地用户在音视频通话中的网络体验。
在调用 IRtcEngine.StartLastmileProbeTest 之后,SDK 会在约 5 秒内返回该回调。
quality | 网络上下行质量,基于上下行网络的丢包率和抖动计算,探测结果主要反映上行网络的状态。 |
delegate void nertc.OnLastmileProbeResult | ( | RtcLastmileProbeResult | result | ) |
通话前网络上下行 Last mile 质量探测报告回调。
该回调描述本地用户在加入房间前的 last mile 网络探测详细报告,报告中通过客观数据反馈上下行网络质量,包括网络抖动、丢包率等数据。您可以通过该回调客观预测本地用户在音视频通话中的网络状态。
在调用 IRtcEngine.StartLastmileProbeTest 之后,SDK 会在约 30 秒内返回该回调。
result | 上下行 Last mile 质量探测结果。 |
delegate void nertc.OnMediaRightChanged | ( | bool | audioBanned, |
bool | videoBanned | ||
) |
服务端禁言音视频权限变化回调。
audioBanned | 是否禁用音频。
|
videoBanned | 是否禁用视频。
|
delegate void nertc.OnCheckNECastAudioDriverResult | ( | RtcInstallCastAudioDriverResult | result | ) |
收到检测安装声卡的内容回调(仅适用于 Mac 系统)。
在 Mac 系统上,您可以通过调用 IRtcEngine.CheckNECastAudioDriver 为当前系统安装一个音频驱动,并让 SDK 通过该音频驱动捕获当前 Mac 系统播放出的声音。
result | 安装虚拟声卡的结果。详细信息请参考 RtcInstallCastAudioDriverResult。 |
delegate void nertc.OnVirtualBackgroundSourceEnabled | ( | bool | enabled, |
RtcVirtualBackgroundSourcStateReason | reason | ||
) |
通知虚拟背景功能是否成功启用的回调。
调用 EnableVirtualBackground 方法后,SDK 返回此回调通知虚拟背景功能是否成功启用。
enabled | 是否成功启用虚拟背景。
|
reason | 虚拟背景功能未成功启用的原因或成功启用虚拟背景功能的通知。详细信息请参考 RtcVirtualBackgroundSourceStateReason。 |
delegate void nertc.OnLocalVideoWatermarkState | ( | RtcVideoStreamType | type, |
RtcLocalVideoWatermarkState | state | ||
) |
本地视频水印生效结果回调。
调用 SetLocalVideoWatermarkConfigs 接口启用本地视频水印后,SDK 会触发此回调。
type | 对应的视频流类型,即主流或辅流。详细信息请参考 RtcVideoStreamType。 |
state | 水印状态。详细信息请参考 RtcLocalVideoWatermarkState。 |
delegate void nertc.OnPermissionKeyWillExpire | ( | ) |
权限密钥即将过期事件回调。
delegate void nertc.OnUpdatePermissionKey | ( | string | key, |
RtcErrorCode | error, | ||
int | timeout | ||
) |
更新权限密钥事件回调。
参数名称 | 类型 | 描述 |
---|---|---|
key | string | 新的权限密钥。 |
error | RtcErrorCode | 错误码。
|
timeout | int | 更新后的权限密钥剩余有效时间。单位为秒。 |
delegate void nertc.OnUserDataReceiveMessage | ( | ulong | uid, |
string | sourceId, | ||
byte[] | data | ||
) |
远端用户通过数据通道发送数据的回调。
uid | 远端用户ID。 |
sourceId | 远端source ID。 |
data | 数据。 |
delegate void nertc.OnUserDataStart | ( | ulong | uid | ) |
远端用户开启数据通道的回调。
uid | 远端用户ID。 |
delegate void nertc.OnUserDataStop | ( | ulong | uid | ) |
远端用户停用数据通道的回调。
uid | 远端用户ID。 |
delegate void nertc.OnUserDataStateChanged | ( | ulong | uid, |
string | sourceId | ||
) |
远端用户数据通道状态变更回调。
uid | 远端用户ID。 |
sourceId | 远端用户source ID。 |
delegate void nertc.OnUserDataBufferedAmountChanged | ( | ulong | uid, |
string | sourceId, | ||
ulong | previousAmount | ||
) |
远端用户数据通道buffer变更回调。
uid | 远端用户ID。 |
sourceId | 远端用户source ID。 |
previousAmount | 变更前大小。 |
delegate void nertc.ChannelOnError | ( | IRtcChannel | channel, |
int | errorCode, | ||
string | msg | ||
) |
发生错误回调。
该回调方法表示 SDK 运行时出现了(网络或媒体相关的)错误。通常情况下,SDK上报的错误意味着SDK无法自动恢复,需要 App 干预或提示用户。
channel | 当前 IRtcChannel 对象 |
errorCode | 错误码。详细信息请参考 RtcErrorCode |
msg | 错误描述。 |
delegate void nertc.ChannelOnWarning | ( | IRtcChannel | channel, |
int | warnCode, | ||
string | msg | ||
) |
发生警告回调。
该回调方法表示 SDK 运行时出现了(网络或媒体相关的)警告。通常情况下,SDK 上报的警告信息 App 可以忽略,SDK 会自动恢复。
channel | 当前 IRtcChannel 对象 |
warnCode | 警告码。详细信息请参考 RtcWarnCode。 |
msg | 警告描述。 |
delegate void nertc.ChannelOnAPICallExecuted | ( | IRtcChannel | channel, |
string | apiName, | ||
RtcErrorCode | errorCode, | ||
string | msg | ||
) |
API调用结束回调。
该回调方法表示 SDK 执行完了一个用户的API调用。
channel | 当前 IRtcChannel 对象 |
apiName | API名称 |
errorCode | API执行结果错误码。 |
msg | API执行结果描述。 |
delegate void nertc.ChannelOnJoinChannel | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
加入房间回调,表示客户端已经登入服务器。
channel | 当前 IRtcChannel 对象 |
cid | 客户端加入的房间 ID。 |
uid | 用户 ID。 如果在 IRtcChannel.JoinChannel 方法中指定了 uid,此处会返回指定的 ID; 如果未指定 uid,此处将返回云信服务器自动分配的 ID。 |
result | 返回结果。 |
elapsed | 从 IRtcChannel.JoinChannel 开始到发生此事件过去的时间,单位为毫秒。 |
delegate void nertc.ChannelOnReconnectingStart | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid | ||
) |
触发重连。
有时候由于网络原因,客户端可能会和服务器失去连接,SDK会进行自动重连,开始自动重连后触发此回调。
channel | 当前 IRtcChannel 对象 |
cid | 房间 ID。 |
uid | 用户 ID。 |
delegate void nertc.ChannelOnConnectionStateChanged | ( | IRtcChannel | channel, |
RtcConnectionStateType | state, | ||
RtcReasonConnectionChangedType | reason | ||
) |
网络连接状态已改变回调。
该回调在网络连接状态发生改变的时候触发,并告知用户当前的网络连接状态和引起网络状态改变的原因。
channel | 当前 IRtcChannel 对象 |
state | 当前的网络连接状态。 |
reason | 引起当前网络连接状态发生改变的原因。 |
delegate void nertc.ChannelOnRejoinChannel | ( | IRtcChannel | channel, |
ulong | cid, | ||
ulong | uid, | ||
RtcErrorCode | result, | ||
ulong | elapsed | ||
) |
重新加入房间回调。
在弱网环境下,若客户端和服务器失去连接,SDK会自动重连。自动重连成功后触发此回调方法。
channel | 当前 IRtcChannel 对象 |
cid | 客户端加入的房间 ID。 |
uid | 用户 ID。 |
result | 返回结果。 |
elapsed | 从开始重连到发生此事件过去的时间,单位为毫秒。 |
delegate void nertc.ChannelOnLeaveChannel | ( | IRtcChannel | channel, |
RtcErrorCode | result | ||
) |
退出房间回调。
App 调用 IRtcChannel.LeaveChannel 方法后,SDK 提示 App 退出房间是否成功。
channel | 当前 IRtcChannel 对象 |
result | 返回结果。 |
delegate void nertc.ChannelOnDisconnect | ( | IRtcChannel | channel, |
RtcErrorCode | reason | ||
) |
网络连接中断
channel | 当前 IRtcChannel 对象 |
reason | 网络连接中断原因。 |
delegate void nertc.ChannelOnClientRoleChanged | ( | IRtcChannel | channel, |
RtcClientRole | oldRole, | ||
RtcClientRole | newRole | ||
) |
直播场景下用户角色已切换回调。
本地用户加入房间后,通过 IRtcChannel.SetClientRole 切换用户角色后会触发此回调。例如主播切换为观众、从观众切换为主播。
channel | 当前 IRtcChannel 对象 |
oldRole | 切换前的角色。 |
newRole | 切换后的角色。 |
delegate void nertc.ChannelOnUserJoined | ( | IRtcChannel | channel, |
ulong | uid, | ||
string | userName, | ||
RtcUserJoinExtraInfo | customInfo | ||
) |
远端用户加入当前房间回调。
该回调提示有远端用户加入了房间,并返回新加入用户的 ID;如果加入之前,已经有其他用户在房间中了,新加入的用户也会收到这些已有用户加入房间的回调。
channel | 当前 IRtcChannel 对象 |
uid | 新加入房间的远端用户 ID。 |
userName | 新加入房间的远端用户名。 |
customInfo | 该远端用户加入的额外信息。 |
delegate void nertc.ChannelOnUserLeft | ( | IRtcChannel | channel, |
ulong | uid, | ||
RtcSessionLeaveReason | reason, | ||
RtcUserJoinExtraInfo | customInfo | ||
) |
远端用户离开当前房间的回调。
提示有远端用户离开了房间(或掉线)。通常情况下,用户离开房间有两个原因,即正常离开和超时掉线:
channel | 当前 IRtcChannel 对象 |
uid | 离开房间的远端用户 ID。 |
reason | 远端用户离开原因。 |
customInfo | 该远端用户加入的额外信息。 |
delegate void nertc.ChannelOnUserAudioStart | ( | IRtcChannel | channel, |
RtcAudioStreamType | type, | ||
ulong | uid | ||
) |
远端用户开启音频的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.ChannelOnUserAudioStop | ( | IRtcChannel | channel, |
RtcAudioStreamType | type, | ||
ulong | uid | ||
) |
远端用户停用音频的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.ChannelOnUserAudioMute | ( | IRtcChannel | channel, |
RtcAudioStreamType | type, | ||
ulong | uid, | ||
bool | mute | ||
) |
远端用户是否静音的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
mute | 是否静音。 |
delegate void nertc.ChannelOnUserVideoStart | ( | IRtcChannel | channel, |
RtcVideoStreamType | type, | ||
ulong | uid, | ||
RtcVideoProfileType | maxProfile | ||
) |
远端用户开启视频的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
maxProfile | 视频编码的分辨率,用于衡量编码质量。 |
delegate void nertc.ChannelOnUserVideoStop | ( | IRtcChannel | channel, |
RtcVideoStreamType | type, | ||
ulong | uid | ||
) |
远端用户停用视频的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
delegate void nertc.ChannelOnUserVideoMute | ( | IRtcChannel | channel, |
RtcVideoStreamType | type, | ||
ulong | uid, | ||
bool | mute | ||
) |
远端用户暂停或恢复发送视频流的回调。
channel | 当前 IRtcChannel 对象 |
type | 远端用户流类型。 |
uid | 远端用户ID。 |
mute | 是否禁视频流。 |
delegate void nertc.ChannelOnScreenCaptureStatusChanged | ( | IRtcChannel | channel, |
RtcScreenCaptureStatus | status | ||
) |
delegate void nertc.ChannelOnUserVideoProfileUpdate | ( | IRtcChannel | channel, |
ulong | uid, | ||
RtcVideoProfileType | maxProfile | ||
) |
channel | 当前 IRtcChannel 对象 |
uid | 远端用户 ID。 |
maxProfile | 视频编码的分辨率,用于衡量编码质量。 |
delegate void nertc.ChannelOnFirstAudioDataReceived | ( | IRtcChannel | channel, |
RtcAudioStreamType | type, | ||
ulong | uid | ||
) |
已接收到远端音频首帧的回调。
channel | 当前 IRtcChannel 对象 |
type | 音频流类型。 |
uid | 远端用户 ID,指定是哪个用户的音频流。 |
delegate void nertc.ChannelOnFirstVideoDataReceived | ( | IRtcChannel | channel, |
RtcVideoStreamType | type, | ||
ulong | uid | ||
) |
已显示首帧远端视频的回调。 第一帧远端视频显示在视图上时,触发此调用。
channel | 当前 IRtcChannel 对象 |
type | 视频流类型。 |
uid | 用户 ID,指定是哪个用户的视频流。 |
delegate void nertc.ChannelOnRemoteVideoReceiveSizeChanged | ( | ulong | uid, |
RtcVideoStreamType | type, | ||
uint | width, | ||
uint | height | ||
) |
接收的远端视频分辨率变化回调。
当远端用户视频流的分辨率发生变化时,会触发此回调。 例如推流端调用 SetVideoConfig 更改了编码分辨率设置,本地会收到该远端用户分辨率变化通知。
uid | 用户 ID,指定是哪个用户的视频流。 |
type | 视频通道类型:kNERTCVideoStreamMain:主流。 kNERTCVideoStreamSub:辅流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.ChannelOnLocalVideoRenderSizeChanged | ( | RtcVideoStreamType | type, |
uint | width, | ||
uint | height | ||
) |
本地视频预览的分辨率变化回调, 与是否进入房间的状态无关,与硬件状态有关,也适用于预览
当本地视频的分辨率发生变化,会触发此回调。当调用 SetCaptureConfig 设置采集分辨率或调用 SetVideoConfig 设置编码属性时可以触发该回调。 回调的分辨率宽和高为本地预览的宽和高,和实际编码发送的分辨率不一定一致。
type | 视频通道类型:kNERTCVideoStreamMain:主流。 kNERTCVideoStreamSub:辅流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.ChannelOnFirstAudioFrameDecoded | ( | IRtcChannel | channel, |
RtcAudioStreamType | type, | ||
ulong | uid | ||
) |
已解码远端音频首帧的回调。
channel | 当前 IRtcChannel 对象 |
type | 音频流类型。 |
uid | 远端用户 ID,指定是哪个用户的音频流。 |
delegate void nertc.ChannelOnFirstVideoFrameDecoded | ( | IRtcChannel | channel, |
RtcVideoStreamType | type, | ||
ulong | uid, | ||
uint | width, | ||
uint | height | ||
) |
已接收到远端视频并完成解码的回调。
引擎收到第一帧远端视频流并解码成功时,触发此调用。
channel | 当前 IRtcChannel 对象 |
type | 视频流类型。 |
uid | 用户 ID,指定是哪个用户的视频流。 |
width | 视频流宽(px)。 |
height | 视频流高(px)。 |
delegate void nertc.ChannelOnLocalAudioVolumeIndication | ( | IRtcChannel | channel, |
int | volume, | ||
bool | enableVad | ||
) |
提示房间内本地用户瞬时音量的回调。
channel | 当前 IRtcChannel 对象 |
volume | (混音后的)音量,取值范围为 [0,100]。 |
enableVad | 是否检测到人声。 |
delegate void nertc.ChannelOnRemoteAudioVolumeIndication | ( | IRtcChannel | channel, |
RtcAudioVolumeInfo[] | speakers, | ||
int | totalVolume | ||
) |
提示房间内谁正在说话及说话者瞬时音量的回调。
该回调默认为关闭状态。可以通过 EnableAudioVolumeIndication 方法开启。开启后,无论房间内是否有人说话,SDK 都会按 EnableAudioVolumeIndication 方法中设置的时间间隔触发该回调。
在返回的 speakers 数组中:
channel | 当前 IRtcChannel 对象 |
speakers | 每个说话者的用户 ID 和音量信息的数组: RtcAudioVolumeInfo |
totalVolume | (混音后的)总音量,取值范围为 [0,100]。 |
delegate void nertc.ChannelOnAddLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
int | errorCode | ||
) |
通知添加直播任务结果。
该回调异步返回 IRtcChannel.AddLiveStreamTask 接口的调用结果;实际推流状态参考 ChannelOnLiveStreamStateChanged
channel | 当前 IRtcChannel 对象 |
taskId | 任务id |
url | 推流地址 |
errorCode | 结果
|
delegate void nertc.ChannelOnUpdateLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
int | errorCode | ||
) |
通知更新直播任务结果。 该回调异步返回 IRtcChannel.UpdateLiveStreamTask 接口的调用结果;实际推流状态参考 ChannelOnLiveStreamStateChanged
channel | 当前 IRtcChannel 对象 |
taskId | 任务id |
url | 推流地址 |
errorCode | 结果
|
delegate void nertc.ChannelOnRemoveLiveStreamTask | ( | IRtcChannel | channel, |
string | taskId, | ||
int | errorCode | ||
) |
通知删除直播任务结果。
该回调异步返回 IRtcChannel.RemoveLiveStreamTask 接口的调用结果;实际推流状态参考 ChannelOnLiveStreamStateChanged
channel | 当前 IRtcChannel 对象 |
taskId | 任务id |
errorCode | 结果
|
delegate void nertc.ChannelOnLiveStreamStateChanged | ( | IRtcChannel | channel, |
string | taskId, | ||
string | url, | ||
RtcLiveStreamStateCode | state | ||
) |
通知直播推流状态
channel | 当前 IRtcChannel 对象 |
taskId | 任务id |
url | 推流地址 |
state | RtcLiveStreamStateCode, 直播推流状态
|
delegate void nertc.ChannelOnRecvSEIMessage | ( | IRtcChannel | channel, |
ulong | uid, | ||
byte[] | data, | ||
uint | dataSize | ||
) |
收到远端流的 SEI 内容回调。
当远端成功发送 SEI 后,本端会收到此回调。
channel | 当前 IRtcChannel 对象 | |
[in] | uid | 发送该 sei 的用户 id |
[in] | data | 接收到的 sei 数据 |
[in] | dataSize | 接收到 sei 数据的大小 |
delegate void nertc.ChannelOnMediaRelayStateChanged | ( | IRtcChannel | channel, |
RtcChannelMediaRelayState | state, | ||
string | channelName | ||
) |
跨房间媒体流转发状态发生改变回调。
channel | 当前 IRtcChannel 对象 |
state | 当前跨房间媒体流转发状态。详细信息请参考 RtcChannelMediaRelayState |
channelName | 媒体流转发的目标房间名。 |
delegate void nertc.ChannelOnMediaRelayEvent | ( | IRtcChannel | channel, |
RtcChannelMediaRelayEvent | evt, | ||
string | channelName, | ||
RtcErrorCode | error | ||
) |
媒体流相关转发事件回调。
channel | 当前 IRtcChannel 对象 |
evt | 当前媒体流转发事件。详细信息请参考 RtcChannelMediaRelayEvent 。 |
channelName | 转发的目标房间名。 |
error | 相关错误码。详细信息请参考 RtcErrorCode 。 |
delegate void nertc.ChannelOnPublishFallbackToAudioOnly | ( | IRtcChannel | channel, |
bool | isFallback, | ||
RtcVideoStreamType | streamType | ||
) |
本地发布流已回退为音频流、或已恢复为音视频流回调。
如果您调用了设置本地推流回退选项 IRtcChannel.SetLocalPublishFallbackOption 接口,并将 option 设置为 kNERtcStreamFallbackAudioOnly 后,当上行网络环境不理想、本地发布的媒体流回退为音频流时,或当上行网络改善、媒体流恢复为音视频流时,会触发该回调。
channel | 当前 IRtcChannel 对象 |
isFallback | 本地发布流已回退或已恢复。
|
streamType | 对应的视频流类型,即主流或辅流。 |
delegate void nertc.ChannelOnSubscribeFallbackToAudioOnly | ( | IRtcChannel | channel, |
ulong | uid, | ||
bool | isFallback, | ||
RtcVideoStreamType | streamType | ||
) |
订阅的远端流已回退为音频流、或已恢复为音视频流回调。
如果你调用了设置远端订阅流回退选项 IRtcChannel.SetRemoteSubscribeFallbackOption 接口并将 option 设置 kNERtcStreamFallbackAudioOnly 后,当下行网络环境不理想、仅接收远端音频流时,或当下行网络改善、恢复订阅音视频流时,会触发该回调。
channel | 当前 IRtcChannel 对象 |
uid | 远端用户的 ID。 |
isFallback | 远端订阅流已回退或恢复:
|
streamType | 对应的视频流类型,即主流或辅流。 |
delegate void nertc.ChannelOnMediaRightChanged | ( | IRtcChannel | channel, |
bool | audioBanned, | ||
bool | videoBanned | ||
) |
服务端禁言音视频权限变化回调。
channel | 当前 IRtcChannel 对象 |
audioBanned | 是否禁用音频。
|
videoBanned | 是否禁用视频。
|
delegate void nertc.ChannelOnPermissionKeyWillExpire | ( | IRtcChannel | channel | ) |
权限密钥即将过期事件回调。
channel | 当前 IRtcChannel 对象 |
delegate void nertc.ChannelOnUpdatePermissionKey | ( | IRtcChannel | channel, |
string | key, | ||
RtcErrorCode | errorCode, | ||
int | timeout | ||
) |
更新权限密钥事件回调。
参数名称 | 类型 | 描述 |
---|---|---|
channel | IRtcChannel | 当前 IRtcChannel 对象。 |
key | string | 新的权限密钥。 |
errorCode | RtcErrorCode | 错误码。
|
timeout | int | 更新后的权限密钥剩余有效时间。单位为秒。 |