hyphenate_SDK3.0  3.0.1
hyphenatejavaIMSDK
| Public 成员函数 | 静态 Public 属性 | Protected 成员函数 | 所有成员列表
com.hyphenate.chat.EMCallManager类 参考

class  EMACallListenerDelegate
 
interface  EMCameraDataProcessor
 
class  EMVideoCallHelper
 

Public 成员函数

String getIncomingCallBroadcastAction ()
 
 EMCallManager (EMClient client, EMACallManager manager)
 
void setCameraDataProcessor (EMCameraDataProcessor processor)
 
EMVideoCallHelper getVideoCallHelper ()
 
CallState getCallState ()
 
void makeVideoCall (String username) throws EMServiceNotReadyException
 
void makeVoiceCall (String username) throws EMServiceNotReadyException
 
void addCallStateChangeListener (EMCallStateChangeListener listener)
 
void removeCallStateChangeListener (EMCallStateChangeListener listener)
 
void setSurfaceView (EMLocalSurfaceView localSurface, EMOppositeSurfaceView oppositeSurface)
 
void answerCall () throws EMNoActiveCallException
 
void rejectCall () throws EMNoActiveCallException
 
void endCall () throws EMNoActiveCallException
 
boolean isDirectCall ()
 
int getVoiceInputLevel ()
 
void pauseVoiceTransfer ()
 
void resumeVoiceTransfer ()
 
void pauseVideoTransfer ()
 
void resumeVideoTransfer ()
 
boolean streamStarted ()
 
void setCameraFacing (int facing) throws HyphenateException
 
synchronized void switchCamera ()
 
int getCameraFacing ()
 

静态 Public 属性

static final String IncomingCallAction = "com.hyphenate.action.incomingcall"
 

Protected 成员函数

void changeState (final CallState callState, final CallError callError)
 

成员函数说明

void com.hyphenate.chat.EMCallManager.addCallStateChangeListener ( EMCallStateChangeListener  listener)

设置通话状态监听

参数
listener
void com.hyphenate.chat.EMCallManager.answerCall ( ) throws EMNoActiveCallException

接听通话

异常
EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.endCall ( ) throws EMNoActiveCallException

挂断通话

异常
EMNoActiveCallException
int com.hyphenate.chat.EMCallManager.getVoiceInputLevel ( )

获取通话时声音输入的大小(范围0-9)

返回
boolean com.hyphenate.chat.EMCallManager.isDirectCall ( )

返回当前通话时是否为P2P直连

check if that's a P2P call

返回
void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username) throws EMServiceNotReadyException

发起呼叫,进行视频通话请求,进行视频呼叫前,请现在Activity.onCreate中先执行setSurfaceView。

参数
username被呼叫的用户id
异常
EMServiceNotReadyException呼叫过程中遇到异常
void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username) throws EMServiceNotReadyException

发起呼叫,进行语音通话请求

参数
username被呼叫的用户id
异常
EMServiceNotReadyException呼叫过程中遇到异常 如果IM没有连接,或者之前通话的连接没有断开,会抛出次异常
void com.hyphenate.chat.EMCallManager.pauseVideoTransfer ( )

实时通话时停止视频数据传输

void com.hyphenate.chat.EMCallManager.pauseVoiceTransfer ( )

实时通话时暂停语音数据传输

void com.hyphenate.chat.EMCallManager.rejectCall ( ) throws EMNoActiveCallException

拒绝接听

异常
EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.removeCallStateChangeListener ( EMCallStateChangeListener  listener)

移除通话监听

参数
listener
void com.hyphenate.chat.EMCallManager.resumeVideoTransfer ( )

实时通话时恢复视频数据传输

void com.hyphenate.chat.EMCallManager.resumeVoiceTransfer ( )

实时通话时恢复语音数据传输

void com.hyphenate.chat.EMCallManager.setCameraFacing ( int  facing) throws HyphenateException

开启相机拍摄

参数
facing参数可以是CameraInfo.CAMERA_FACING_BACK, 或者CameraInfo.CAMERA_FACING_FRONT : 如果cameraIndex不是CameraInfo.CAMERA_FACING_BACK,也不是CameraInfo.CAMERA_FACING_FRONT,会抛出异常.
void com.hyphenate.chat.EMCallManager.setSurfaceView ( EMLocalSurfaceView  localSurface,
EMOppositeSurfaceView  oppositeSurface 
)

Must be called in Activity.onCreate, otherwise can not get surface size accurately.

参数
localSurface
oppositeSurface
boolean com.hyphenate.chat.EMCallManager.streamStarted ( )

check if the stream is already started

返回

该类的文档由以下文件生成: