hyphenate_SDK3.0
3.8.1
hyphenatejavaIMSDK
|
类 | |
class | CallStateUnion |
class | EMACallListenerDelegate |
interface | EMCallPushProvider |
interface | EMCameraDataProcessor |
Public 成员函数 | |
String | getIncomingCallBroadcastAction () |
void | setCameraDataProcessor (EMCameraDataProcessor processor) |
void | setPushProvider (EMCallPushProvider provider) |
CallState | getCallState () |
EMVideoCallHelper | getVideoCallHelper () |
void | makeVideoCall (String username) throws EMServiceNotReadyException |
void | makeVideoCall (String username, String ext) throws EMServiceNotReadyException |
void | makeVideoCall (String username, String ext, boolean recordOnServer, boolean mergeStream) throws EMServiceNotReadyException |
void | makeVoiceCall (String username) throws EMServiceNotReadyException |
void | makeVoiceCall (String username, String ext) throws EMServiceNotReadyException |
void | makeVoiceCall (String username, String ext, boolean recordOnServer, boolean mergeStream) throws EMServiceNotReadyException |
void | addCallStateChangeListener (EMCallStateChangeListener listener) |
void | removeCallStateChangeListener (EMCallStateChangeListener listener) |
synchronized void | setSurfaceView (EMCallSurfaceView localSurface, EMCallSurfaceView oppositeSurface) |
void | answerCall () throws EMNoActiveCallException |
void | rejectCall () throws EMNoActiveCallException |
void | endCall () throws EMNoActiveCallException |
boolean | isDirectCall () |
void | pauseVoiceTransfer () throws HyphenateException |
void | resumeVoiceTransfer () throws HyphenateException |
void | pauseVideoTransfer () throws HyphenateException |
void | resumeVideoTransfer () throws HyphenateException |
void | muteRemoteAudio (boolean mute) |
void | muteRemoteVideo (boolean mute) |
void | setCameraFacing (int facing) throws HyphenateException |
synchronized void | switchCamera () |
int | getCameraFacing () |
EMCallOptions | getCallOptions () |
EMCallSession | getCurrentCallSession () |
void | inputExternalVideoData (byte[] data, int width, int height, int rotation) |
void | inputExternalVideoData (byte[] data, RtcConnection.FORMAT format, int width, int height, int stride, int sliceHeight, int rotation) |
int | inputExternalAudioData (byte[] data, int length) |
void | setWaterMark (EMWaterMarkOption waterMark) |
void | clearWaterMark () |
静态 Public 属性 | |
static final String | IncomingCallAction = ".action.incomingcall" |
Protected 成员函数 | |
EMCallManager (EMClient client, EMACallManager manager) | |
void | changeState (final CallState state, 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.getCameraFacing | ( | ) |
获取当前正在使用的摄像头
int com.hyphenate.chat.EMCallManager.inputExternalAudioData | ( | byte[] | data, |
int | length | ||
) |
从外部直接输入音频数据 (发送的数据为计算出来的10ms的pcm byte数据 该功能目前只支持单声道,)
data | 发送的自定义音频数据(计算出来的10ms的pcm byte数据) |
length | 发送的自定义音频数据长度 ,是计算出来的10ms所需要的pcm byte数据长度, 计算方式: length = sampleRate * 10 / 1000 * bytesPerSample * channels. 参数说明:sampleRate 音频采样率 channels 音频声道(目前本sdk只支持单声道) bytesPerSample = BITS_PER_SAMPLE/8( 一般 BITS_PER_SAMPLE=16 , 默认的音频数据格式是PCM 16位每个样本.) |
void com.hyphenate.chat.EMCallManager.inputExternalVideoData | ( | byte[] | data, |
int | width, | ||
int | height, | ||
int | rotation | ||
) |
从外部直接输入视频数据, 仅支持NV21数据格式
data | |
width | |
height | |
rotation |
void com.hyphenate.chat.EMCallManager.inputExternalVideoData | ( | byte[] | data, |
RtcConnection.FORMAT | format, | ||
int | width, | ||
int | height, | ||
int | stride, | ||
int | sliceHeight, | ||
int | rotation | ||
) |
从外部直接输入视频数据
data | |
width | |
height | |
stride,used | in NV12 format, usally same as width |
sliceHeight,used | in NV12 format, usally same as height |
rotation |
boolean com.hyphenate.chat.EMCallManager.isDirectCall | ( | ) |
返回当前通话时是否为P2P直连
void com.hyphenate.chat.EMCallManager.makeVideoCall | ( | String | username | ) | throws EMServiceNotReadyException |
发起呼叫,进行视频通话请求,进行视频呼叫前,请先在Activity.onCreate中先执行setSurfaceView。
username | 被呼叫的用户id |
EMServiceNotReadyException | 呼叫过程中遇到异常 |
void com.hyphenate.chat.EMCallManager.makeVideoCall | ( | String | username, |
String | ext | ||
) | throws EMServiceNotReadyException |
发起呼叫,进行视频通话请求,进行视频呼叫前,请先在Activity.onCreate中先执行setSurfaceView。
username | 被呼叫的用户id |
ext | 扩展字段,用户可以用来传输自定义的内容 |
EMServiceNotReadyException | 呼叫过程中遇到异常 |
void com.hyphenate.chat.EMCallManager.makeVideoCall | ( | String | username, |
String | ext, | ||
boolean | recordOnServer, | ||
boolean | mergeStream | ||
) | throws EMServiceNotReadyException |
发起呼叫,进行视频通话请求,进行视频呼叫前,请先在Activity.onCreate中先执行setSurfaceView。
username | 被呼叫的用户id |
ext | 扩展字段,用户可以用来传输自定义的内容 |
recordOnServer | 是否在服务器端录制该通话 |
mergeStream | 服务器端录制时是否合并流 |
EMServiceNotReadyException | 呼叫过程中遇到异常 |
void com.hyphenate.chat.EMCallManager.makeVoiceCall | ( | String | username | ) | throws EMServiceNotReadyException |
发起呼叫,进行语音通话请求
username | 被呼叫的用户id |
EMServiceNotReadyException | 呼叫过程中遇到异常 如果IM没有连接,或者之前通话的连接没有断开,会抛出次异常 |
void com.hyphenate.chat.EMCallManager.makeVoiceCall | ( | String | username, |
String | ext | ||
) | throws EMServiceNotReadyException |
发起呼叫,进行语音通话请求
username | 被呼叫的用户id |
ext | 扩展字段,用户可以用来传输自定义的内容 |
EMServiceNotReadyException | 呼叫过程中遇到异常 如果IM没有连接,或者之前通话的连接没有断开,会抛出次异常 |
void com.hyphenate.chat.EMCallManager.makeVoiceCall | ( | String | username, |
String | ext, | ||
boolean | recordOnServer, | ||
boolean | mergeStream | ||
) | throws EMServiceNotReadyException |
发起呼叫,进行语音通话请求
username | 被呼叫的用户id |
ext | 扩展字段,用户可以用来传输自定义的内容 |
recordOnServer | 是否在服务器端录制该通话 |
mergeStream | 服务器端录制时是否合并流 |
EMServiceNotReadyException | 呼叫过程中遇到异常 如果IM没有连接,或者之前通话的连接没有断开,会抛出次异常 |
void com.hyphenate.chat.EMCallManager.muteRemoteAudio | ( | boolean | mute | ) |
mute远端音频
void com.hyphenate.chat.EMCallManager.muteRemoteVideo | ( | boolean | mute | ) |
~ mute远端视频
void com.hyphenate.chat.EMCallManager.pauseVideoTransfer | ( | ) | throws HyphenateException |
实时通话时停止视频数据传输
void com.hyphenate.chat.EMCallManager.pauseVoiceTransfer | ( | ) | throws HyphenateException |
实时通话时暂停语音数据传输
void com.hyphenate.chat.EMCallManager.rejectCall | ( | ) | throws EMNoActiveCallException |
拒绝接听
EMNoActiveCallException |
void com.hyphenate.chat.EMCallManager.removeCallStateChangeListener | ( | EMCallStateChangeListener | listener | ) |
移除通话监听
listener |
void com.hyphenate.chat.EMCallManager.resumeVideoTransfer | ( | ) | throws HyphenateException |
实时通话时恢复视频数据传输
void com.hyphenate.chat.EMCallManager.resumeVoiceTransfer | ( | ) | throws HyphenateException |
实时通话时恢复语音数据传输
void com.hyphenate.chat.EMCallManager.setCameraDataProcessor | ( | EMCameraDataProcessor | processor | ) |
Not implemented. This method will be removed in future versions.
processor |
void com.hyphenate.chat.EMCallManager.setCameraFacing | ( | int | facing | ) | throws HyphenateException |
开启相机拍摄
facing | 参数可以是CameraInfo.CAMERA_FACING_BACK, 或者CameraInfo.CAMERA_FACING_FRONT |
HyphenateException | 如果cameraIndex不是CameraInfo.CAMERA_FACING_BACK,也不是CameraInfo.CAMERA_FACING_FRONT,会抛出异常. |
synchronized void com.hyphenate.chat.EMCallManager.setSurfaceView | ( | EMCallSurfaceView | localSurface, |
EMCallSurfaceView | oppositeSurface | ||
) |
这里一定要在{Activity::onCreate()}方法中调用,防止无法准确获取到 surface 大小
localSurface | 默认本地预览画面控件 |
oppositeSurface | 默认远端画面控件 |