NERtcChannelEventCallback class abstract
NERtc 异步回调接口,用户需要实现该接口来完成对NERtc各种状态回调的处理
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAudioHasHowling(
) → void - 啸叫检测回调 用于检测是否由于设备距离过近产生啸叫。 当检测到有啸叫信号产生的时候,触发该回调一直到啸叫停止 上层用户接收到回调信息,代表有啸叫产生,用户可提示用户mute麦克风或者是直接操作mute麦克风 啸叫检测用于VoIP场景,音乐场景不支持啸叫检测
-
onAudioRecording(
int code, String filePath) → void -
音频录制状态回调
code
音频录制状态码。详细信息请参考 NERtcAudioRecordingCodefilePath
音频录制文件保存路径 -
onClientRoleChange(
int oldRole, int newRole) → void -
角色切换成功回调
直播场景下,如果您在加入房间后调用该方法切换用户角色,调用成功后,会触发回调
角色定义参考 NERtcClientRole.
oldRole
之前的角色.newRole
现在的角色 -
onConnectionStateChanged(
int state, int reason) → void -
频道连接状态回调
state
当前的网络连接状态 NERtcConnectionStatereason
引起当前网络连接状态发生改变的原因ConnectionStateChangeReason
-
onConnectionTypeChanged(
int newConnectionType) → void - 本地网络类型已改变回调
-
onDisconnect(
int reason) → void - SDK与服务器断线回调
-
onError(
int code) → void - 发生警告回调 该回调方法表示 SDK 运行时出现了(网络或媒体相关的)警告。 通常情况下,SDK 上报的警告信息 App 可以忽略,SDK 会自动恢复
-
onFirstAudioDataReceived(
int uid) → void -
远端音频首帧回调
uid
远端用户 ID -
onFirstAudioFrameDecoded(
int uid) → void - 远端音频首帧解码回调
-
onFirstVideoDataReceived(
int uid) → void - 远端视频首帧回调
-
onFirstVideoFrameDecoded(
int uid, int width, int height) → void - 远端视频首帧解码回调
-
onJoinChannel(
int result, int channelId, int elapsed, int uid) → void - 加入房间回调
-
onLeaveChannel(
int result) → void - 退出房间回调
-
onLiveStreamState(
String taskId, String pushUrl, int liveState) → void -
直播状态回调
taskId
直播task idpushUrl
直播推流urlliveState
直播状态 NERtcLiveStreamState -
onLocalAudioVolumeIndication(
int volume) → void -
提示频道内本地用户瞬时音量的回调。
该回调默认禁用。可以通过
enableAudioVolumeIndication
方法开启; 开启后,本地用户说话,SDK 会按 enableAudioVolumeIndication 方法中设置的时间间隔触发该回调。 如果本地用户将自己静音(调用了 muteLocalAudioStream),SDK 不再报告该回调。 -
onLocalPublishFallbackToAudioOnly(
bool isFallback, int streamType) → void - 本地发布流已回退为音频流、或已恢复为音视频流回调。
-
onMediaRelayReceiveEvent(
int event, int code, String channelName) → void - 媒体流相关转发事件回调
-
onMediaRelayStatesChange(
int state, String channelName) → void - 跨房间媒体流转发状态发生改变回调
-
onReceiveSEIMsg(
int userID, String seiMsg) → void - 收到sei 信息
-
onReconnectingStart(
) → void - 重连开始回调,SDK内部进行重连时回调,重连结果参考 onReJoinChannel、onDisconnect
-
onReJoinChannel(
int result) → void - 重新加入频道回调 有时候由于网络原因,客户端可能会和服务器失去连接,SDK会进行自动重连,自动重连后触发此回调方法
-
onRemoteAudioVolumeIndication(
List< NERtcAudioVolumeInfo> volumeList, int totalVolume) → void - 提示频道内谁正在说话及说话者瞬时音量的回调。 该回调默认禁用。可以通过 enableAudioVolumeIndication 方法开启; 开启后,无论频道内是否有人说话,SDK 都会按 enableAudioVolumeIndication 方法中设置的时间间隔触发该回调
-
onRemoteSubscribeFallbackToAudioOnly(
int uid, bool isFallback, int streamType) → void - 订阅的远端流已回退为音频流、或已恢复为音视频流回调。 如果你调用了设置远端订阅流回退选项 NERtcEngine.setRemoteSubscribeFallbackOption 接口, 并将参数设置 NERtcStreamFallbackOptions.audioOnly 后,当下行网络环境不理想、仅接收远端音频流时, 或当下行网络改善、恢复订阅音视频流时,会触发该回调。
-
onUserAudioMute(
int uid, bool muted) → void - 远端用户关闭音频的发送。
-
onUserAudioStart(
int uid) → void - 远端用户开启音频功能。
-
onUserAudioStop(
int uid) → void - 远端用户关闭音频功能。
-
onUserJoined(
int uid) → void - 用户加入房间.
-
onUserLeave(
int uid, int reason) → void - 用户离开房间
-
onUserSubStreamVideoStart(
int uid, int maxProfile) → void - 远端用户开启视频辅流
-
onUserSubStreamVideoStop(
int uid) → void - 远端用户开启视频辅流
-
onUserVideoMute(
int uid, bool muted) → void - 远端用户是否关闭视频的发送
-
onUserVideoProfileUpdate(
int uid, int maxProfile) → void - 用户视频能力更新
-
onUserVideoStart(
int uid, int maxProfile) → void - 远端用户开启视频功能。
-
onUserVideoStop(
int uid) → void - 远端用户关闭视频功能。
-
onWarning(
int code) → void - 发生错误回调 该回调方法表示 SDK 运行时出现了(网络或媒体相关的)错误。 通常情况下,SDK上报的错误意味着SDK无法自动恢复,需要 App 干预或提示用户
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited