public abstract class RTSManager
extends java.lang.Object
构造器和说明 |
---|
RTSManager() |
限定符和类型 | 方法和说明 |
---|---|
abstract boolean |
accept(java.lang.String sessionId,
RTSOptions options,
RTSCallback<java.lang.Boolean> callback)
(接收方)接受会话
|
abstract boolean |
close(java.lang.String sessionId,
RTSCallback<java.lang.Void> callback)
(接受方)拒绝会话或者结束会话
|
static RTSManager |
getInstance()
获取抽象类具体实现对象
|
abstract RTSNetworkProxy |
getNetworkProxy()
获取已经设置的网络代理
|
abstract boolean |
isMuted(java.lang.String sessionId)
是否静音
|
abstract boolean |
isSpeakerOn(java.lang.String sessionId)
是否打开扬声器
|
abstract boolean |
observeCalleeAckNotification(java.lang.String sessionId,
Observer<RTSCalleeAckEvent> observer,
boolean register)
注册/注销发起会话后,被叫方的响应(接听、拒绝、忙)
|
abstract boolean |
observeChannelState(java.lang.String sessionId,
RTSChannelStateObserver observer,
boolean register)
注册/注销通道状态变化的通知
|
abstract boolean |
observeControlNotification(java.lang.String sessionId,
Observer<RTSControlEvent> observer,
boolean register)
注册/注销会话控制消息
|
abstract boolean |
observeHangUpNotification(java.lang.String sessionId,
Observer<RTSCommonEvent> observer,
boolean register)
注册/注销会话对方挂断的通知
|
abstract void |
observeIncomingSession(Observer<RTSData> observer,
boolean register)
注册/注销监听收到的会话请求
建议在APP启动时就添加此监听
|
abstract boolean |
observeOnlineAckNotification(java.lang.String sessionId,
Observer<RTSOnlineAckEvent> observer,
boolean register)
注册/注销同时在线的其他端对主叫方的响应
|
abstract boolean |
observeReceiveData(java.lang.String sessionId,
Observer<RTSTunData> observer,
boolean register)
注册/注销对方从某个通道发来的数据
|
abstract boolean |
observeTimeoutNotification(java.lang.String sessionId,
Observer<RTSTimeOutEvent> observer,
boolean register)
注册/注销到来的会话或者自己发起的会话(自己或者对方无响应)超时的通知,默认超时时间为40秒
|
abstract boolean |
sendControlCommand(java.lang.String sessionId,
java.lang.String data,
RTSCallback<java.lang.Void> callback)
发送控制指令
|
abstract boolean |
sendData(RTSTunData data)
向指定会话的某个通道中的某个用户发送数据,也可以广播给所有用户(在RTSTunData中,对方帐号填null)
|
abstract void |
setMute(java.lang.String sessionId,
boolean mute)
静音开关
|
abstract void |
setNetworkProxy(RTSNetworkProxy proxy)
设置网络代理,需要在发起会话前设置
|
abstract void |
setSpeaker(java.lang.String sessionId,
boolean enable)
扬声器开关
|
abstract java.lang.String |
start(java.lang.String account,
java.util.List<RTSTunnelType> tunTypes,
RTSOptions options,
RTSNotifyOption notifyOption,
RTSCallback<RTSData> callback)
(发送方)发起会话, 调用此接口对方会收到相应的会话请求通知
|
public static RTSManager getInstance()
public abstract void setNetworkProxy(RTSNetworkProxy proxy)
proxy
- 代理信息public abstract RTSNetworkProxy getNetworkProxy()
public abstract java.lang.String start(java.lang.String account, java.util.List<RTSTunnelType> tunTypes, RTSOptions options, RTSNotifyOption notifyOption, RTSCallback<RTSData> callback)
account
- 对方帐号tunTypes
- 通道类型集合:AUDIO、DATAoptions
- 可选参数: 是否录制通道数据notifyOption
- 可选参数: 推送相关参数控制callback
- 回调函数,返回RTSDatapublic abstract boolean accept(java.lang.String sessionId, RTSOptions options, RTSCallback<java.lang.Boolean> callback)
sessionId
- 会话IDoptions
- 可选参数:是否录制通道数据callback
- 回调函数,返回本地通道初始化是否成功public abstract boolean close(java.lang.String sessionId, RTSCallback<java.lang.Void> callback)
sessionId
- 会话IDcallback
- 回调函数public abstract boolean sendControlCommand(java.lang.String sessionId, java.lang.String data, RTSCallback<java.lang.Void> callback)
sessionId
- 会话IDdata
- 控制指令内容callback
- 回调函数public abstract void observeIncomingSession(Observer<RTSData> observer, boolean register)
observer
- 观察者,参数为会话的信息register
- true为注册,false为注销public abstract boolean observeCalleeAckNotification(java.lang.String sessionId, Observer<RTSCalleeAckEvent> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者, 参数为被叫方的响应register
- true为注册,false为注销public abstract boolean observeOnlineAckNotification(java.lang.String sessionId, Observer<RTSOnlineAckEvent> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者,参数为同时在线的其他端响应主叫方的同步通知register
- true为注册,false为注销public abstract boolean observeHangUpNotification(java.lang.String sessionId, Observer<RTSCommonEvent> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者, 参数为对方挂断信息register
- true为注册,false为注销public abstract boolean observeChannelState(java.lang.String sessionId, RTSChannelStateObserver observer, boolean register)
sessionId
- 会话IDobserver
- 观察者,参数为通话会话(通道)状态回调(例如是否连接上服务器,通道是否有成员加入等)register
- true为注册,false为注销public abstract boolean observeControlNotification(java.lang.String sessionId, Observer<RTSControlEvent> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者, 参数为接收到的会话控制消息register
- true为注册,false为注销public abstract boolean observeTimeoutNotification(java.lang.String sessionId, Observer<RTSTimeOutEvent> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者,参数为超时事件详细信息register
- true为注册,false为注销public abstract boolean sendData(RTSTunData data)
data
- 要发送的数据信息,其中toAccount表示目标用户(填null,表示广播给所有用户)public abstract boolean observeReceiveData(java.lang.String sessionId, Observer<RTSTunData> observer, boolean register)
sessionId
- 会话IDobserver
- 观察者,参数为收到的数据信息register
- true为注册,false为注销public abstract void setMute(java.lang.String sessionId, boolean mute)
sessionId
- 会话IDmute
- 是否静音public abstract boolean isMuted(java.lang.String sessionId)
sessionId
- 会话IDpublic abstract void setSpeaker(java.lang.String sessionId, boolean enable)
sessionId
- 会话IDenable
- 是否打开public abstract boolean isSpeakerOn(java.lang.String sessionId)
sessionId
- 会话ID