NIMSDK-AOS  10.9.71
RTSChannelStateObserver.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.rts;
2 
3 
5 
6 /**
7  * RTS通道状态观察者
8  */
9 public interface RTSChannelStateObserver {
10 
11  /**
12  * 与服务器连接结果通知
13  *
14  * @param localSessionId 本地 Session ID
15  * @param tunType 通道类型
16  * @param channelId 服务器创建的频道ID
17  * @param code 错误码,成功默认200
18  * @param recordFile 服务器录制文件地址
19  */
20  void onConnectResult(String localSessionId, RTSTunnelType tunType, long channelId, int code, String recordFile);
21 
22  /**
23  * 会话建立
24  *
25  * @param localSessionId
26  * @param tunType
27  */
28  void onChannelEstablished(String localSessionId, RTSTunnelType tunType);
29 
30  /**
31  * 用户加入
32  *
33  * @param localSessionId 本地 Session ID
34  * @param tunType 通道类型
35  * @param account 用户账号
36  */
37  void onUserJoin(String localSessionId, RTSTunnelType tunType, String account);
38 
39 
40  /**
41  * 用户离开
42  *
43  * @param localSessionId 本地 Session ID
44  * @param tunType 通道类型
45  * @param account 用户账号
46  * @param event
47  */
48  void onUserLeave(String localSessionId, RTSTunnelType tunType, String account, int event);
49 
50  /**
51  * 与服务器断开连接
52  *
53  * @param localSessionId 本地 Session ID
54  * @param tunType 通道类型
55  */
56  void onDisconnectServer(String localSessionId, RTSTunnelType tunType);
57 
58 
59  /**
60  * 通道发生错误
61  *
62  * @param localSessionId 本地 Session ID
63  * @param tunType 通道类型
64  * @param error 错误码
65  * @see com.netease.nimlib.sdk.rts.constant.RTSError
66  */
67 
68  void onError(String localSessionId, RTSTunnelType tunType, int error);
69 
70  /**
71  * 网络状态发生变化
72  *
73  * @param localSessionId 本地 Session ID
74  * @param channelType 通道类型
75  * @param value 0-3,值越小信号越好,0:最好,3:最差
76  */
77  void onNetworkStatusChange(String localSessionId, RTSTunnelType channelType, int value);
78 }
void onUserLeave(String localSessionId, RTSTunnelType tunType, String account, int event)
用户离开
会话类型(需要支持的通道类型:语音通道、数据通道)
void onError(String localSessionId, RTSTunnelType tunType, int error)
通道发生错误
void onDisconnectServer(String localSessionId, RTSTunnelType tunType)
与服务器断开连接
void onNetworkStatusChange(String localSessionId, RTSTunnelType channelType, int value)
网络状态发生变化
void onUserJoin(String localSessionId, RTSTunnelType tunType, String account)
用户加入
void onConnectResult(String localSessionId, RTSTunnelType tunType, long channelId, int code, String recordFile)
与服务器连接结果通知
void onChannelEstablished(String localSessionId, RTSTunnelType tunType)
会话建立