|
NIMSDK-AOS
9.20.15
|
通话过程中的状态变化监听 更多...
Public 成员函数 | |
| void | onJoinedChannel (int code, String audioFile, String videoFile, int elapsed) |
| 服务器连接回调 更多... | |
| void | onUserJoined (String account) |
| 用户加入频道 更多... | |
| void | onUserLeave (String account, int event) |
| 用户离开频道 更多... | |
| void | onLeaveChannel () |
| 退出频道. 更多... | |
| void | onProtocolIncompatible (int status) |
| 双方协议版本不兼容 更多... | |
| void | onDisconnectServer (int code) |
| 从服务器断开连接会收到此通知。 更多... | |
| void | onNetworkQuality (String account, int quality, AVChatNetworkStats stats) |
| 网络状态发生变化 更多... | |
| void | onCallEstablished () |
| 会话成功建立. 更多... | |
| void | onDeviceEvent (int code, String desc) |
| 语音采集设备和视频采集设备事件通知 更多... | |
| void | onConnectionTypeChanged (int netType) |
| 客户端网络类型发生了变化 更多... | |
| void | onFirstVideoFrameAvailable (String account) |
| 用户第一帧视频数据绘制前通知. 更多... | |
| void | onFirstVideoFrameRendered (String account) |
| 第一帧绘制通知 更多... | |
| void | onVideoFrameResolutionChanged (String account, int width, int height, int rotate) |
| 用户画面尺寸改变通知 更多... | |
| void | onVideoFpsReported (String account, int fps) |
| 用户视频画面fps更新, 需要设置参数 AVChatParameters#KEY_VIDEO_FPS_REPORTED. 更多... | |
| boolean | onVideoFrameFilter (AVChatVideoFrame frame, boolean maybeDualInput) |
| 视频数据外部处理接口, 此接口需要同步执行. 更多... | |
| boolean | onVideoFrameFilter (final VideoFrame input, VideoFrame[] outputFrames, VideoFilterParameter filterParameter) |
| 视频数据外部处理接口, 此接口需要同步执行. 更多... | |
| boolean | onAudioFrameFilter (AVChatAudioFrame frame) |
| 语音数据处理接口, 不要改变数据的长度. 更多... | |
| void | onAudioDeviceChanged (int device, Set< Integer > set, boolean shouldSelect) |
| 音频设备变化 更多... | |
| void | onReportSpeaker (Map< String, Integer > speakers, int mixedEnergy) |
| 汇报正在说话的用户。 需要设置参数 AVChatParameters#KEY_AUDIO_REPORT_SPEAKER. 更多... | |
| void | onSessionStats (AVChatSessionStats sessionStats) |
| 实时统计信息 更多... | |
| void | onLiveEvent (int event) |
| 互动直播相关事件通知 更多... | |
通话过程中的状态变化监听
在文件 AVChatStateObserverLite.java 第 28 行定义.
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onAudioDeviceChanged | ( | int | device, |
| Set< Integer > | set, | ||
| boolean | shouldSelect | ||
| ) |
音频设备变化
| device | 语音设备 |
| set | 可选语音设备 |
| shouldSelect | 如果为true,可以弹框选择蓝牙外放、耳机外放选项 |
| boolean com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onAudioFrameFilter | ( | AVChatAudioFrame | frame | ) |
语音数据处理接口, 不要改变数据的长度.
需要设置参数 AVChatParameters#KEY_AUDIO_FRAME_FILTER.
| frame | 语音帧 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onCallEstablished | ( | ) |
会话成功建立.
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onConnectionTypeChanged | ( | int | netType | ) |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onDeviceEvent | ( | int | code, |
| String | desc | ||
| ) |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onDisconnectServer | ( | int | code | ) |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onFirstVideoFrameAvailable | ( | String | account | ) |
用户第一帧视频数据绘制前通知.
| account | 用户账号 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onFirstVideoFrameRendered | ( | String | account | ) |
第一帧绘制通知
| account | 用户账号 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onJoinedChannel | ( | int | code, |
| String | audioFile, | ||
| String | videoFile, | ||
| int | elapsed | ||
| ) |
服务器连接回调
| code | 加入服务器结果 AVChatResCode.JoinChannelCode |
| audioFile | 如果存在服务器录制,指向语音文件. |
| videoFile | 如果存在服务器录制,指向视频文件. |
| elapsed | 从下面三个相关调用处开始计算,到成功加入房间的耗时,单位ms |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onLeaveChannel | ( | ) |
退出频道.
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onLiveEvent | ( | int | event | ) |
互动直播相关事件通知
| event | AVChatResCode.LiveEventCode |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onNetworkQuality | ( | String | account, |
| int | quality, | ||
| AVChatNetworkStats | stats | ||
| ) |
网络状态发生变化
| account | 用户账号 |
| quality | 网络状态等级 |
| stats | 网络状态信息 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onProtocolIncompatible | ( | int | status | ) |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onReportSpeaker | ( | Map< String, Integer > | speakers, |
| int | mixedEnergy | ||
| ) |
汇报正在说话的用户。 需要设置参数 AVChatParameters#KEY_AUDIO_REPORT_SPEAKER.
| speakers | 用户账号和声音强度的键值对 |
| mixedEnergy | 除去自己后,所有用户语音混音后的强度 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onSessionStats | ( | AVChatSessionStats | sessionStats | ) |
实时统计信息
| sessionStats | 详细的统计信息 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onUserJoined | ( | String | account | ) |
用户加入频道
| account | 用户账号 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onUserLeave | ( | String | account, |
| int | event | ||
| ) |
用户离开频道
| account | 用户ID |
| event | AVChatUserQuitType |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onVideoFpsReported | ( | String | account, |
| int | fps | ||
| ) |
用户视频画面fps更新, 需要设置参数 AVChatParameters#KEY_VIDEO_FPS_REPORTED.
| account | 用户账号 |
| fps | 当前绘制帧率 |
| boolean com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onVideoFrameFilter | ( | AVChatVideoFrame | frame, |
| boolean | maybeDualInput | ||
| ) |
视频数据外部处理接口, 此接口需要同步执行.
操作运行在视频数据发送线程上,处理速度过慢会导致帧率过低
| frame | 待处理数据 |
| maybeDualInput | 如果为 true false |
| boolean com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onVideoFrameFilter | ( | final VideoFrame | input, |
| VideoFrame[] | outputFrames, | ||
| VideoFilterParameter | filterParameter | ||
| ) |
视频数据外部处理接口, 此接口需要同步执行.
操作运行在视频数据发送线程上,处理速度过慢会导致帧率过低
| input | 待处理数据 |
| outputFrames | VideoFrame[0] 处理后的原始数据,VideoFrame[1] 处理后的镜像数据。 如果为 false |
| filterParameter | 待处理数据的参数 |
| void com.netease.nimlib.sdk.avchat.AVChatStateObserverLite.onVideoFrameResolutionChanged | ( | String | account, |
| int | width, | ||
| int | height, | ||
| int | rotate | ||
| ) |
用户画面尺寸改变通知
| account | 用户账号 |
| width | 视频宽 |
| height | 视频高 |
| rotate | 视频角度 |
1.8.11