hyphenate_SDK3.0 3.7.6.3
hyphenate java IM SDK
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.hyphenate.chat.EMCallManager Class Reference

Classes

class  CallStateUnion
 
class  EMACallListenerDelegate
 
interface  EMCallPushProvider
 
interface  EMCameraDataProcessor
 

Public Member Functions

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 ()
 

Static Public Attributes

static final String IncomingCallAction = ".action.incomingcall"
 

Protected Member Functions

 EMCallManager (EMClient client, EMACallManager manager)
 
void changeState (final CallState state, final CallError callError)
 

Member Function Documentation

◆ addCallStateChangeListener()

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

register call state change listener

Parameters
listener

◆ answerCall()

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

answer phone call

Exceptions
EMNoActiveCallException

◆ endCall()

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

hang up phone call

Exceptions
EMNoActiveCallException

◆ getCameraFacing()

int com.hyphenate.chat.EMCallManager.getCameraFacing ( )

get the camera currently using

Returns
camera int value

◆ inputExternalAudioData()

int com.hyphenate.chat.EMCallManager.inputExternalAudioData ( byte[]  data,
int  length 
)

Send external custom audio data, please call after successfully joining the meeting. (the data sent is calculated as PCM byte data of 10ms. This function only supports mono channel at present.)

Parameters
dataCustom audio data sent (calculated PCM byte data of 10ms)
lengthThe length of custom audio data sent is the length of PCM byte required by the calculated 10ms. formula mode: length = sampleRate * 10 / 1000 * bytesPerSample * channels. sampleRate: Audio sampling rate channels:Audio channel (currently this SDK only supports mono channel) bytesPerSample = BITS_PER_SAMPLE/8(BITS_PER_SAMPLE=16 , Default audio data format is PCM 16 bit per sample.)
Returns
0 - Input success -1 - Input failed, buffer not full -2 - Input failed, buffer full

◆ inputExternalVideoData() [1/2]

void com.hyphenate.chat.EMCallManager.inputExternalVideoData ( byte[]  data,
int  width,
int  height,
int  rotation 
)

input video data from external data source, only support NV21 format.

Parameters
data
width
height
rotation

Use inputExternalVideoData(byte[], RtcConnection.FORMAT, int, int, int) for instead.

◆ inputExternalVideoData() [2/2]

void com.hyphenate.chat.EMCallManager.inputExternalVideoData ( byte[]  data,
RtcConnection.FORMAT  format,
int  width,
int  height,
int  stride,
int  sliceHeight,
int  rotation 
)

input video data from external data source

Parameters
data
width
height
stride,usedin NV12 format, usally same as width
sliceHeight,usedin NV12 format, usally same as height
rotation

◆ isDirectCall()

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

check if it's a P2P call with direct connection

Returns

◆ makeVideoCall() [1/3]

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

make video call, before make video call, call setSurfaceView in Activity.onCreate firstly.

Parameters
usernamecallee's user id
Exceptions
EMServiceNotReadyException

◆ makeVideoCall() [2/3]

void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username,
String  ext 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
Exceptions
EMServiceNotReadyException

◆ makeVideoCall() [3/3]

void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username,
String  ext,
boolean  recordOnServer,
boolean  mergeStream 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
recordOnServerif record on server
mergeStreamif merge stream when record on server
Exceptions
EMServiceNotReadyException

◆ makeVoiceCall() [1/3]

void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException

◆ makeVoiceCall() [2/3]

void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username,
String  ext 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException

◆ makeVoiceCall() [3/3]

void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username,
String  ext,
boolean  recordOnServer,
boolean  mergeStream 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
recordOnServerif record on server
mergeStreamif merge the streams if record on server
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException

◆ muteRemoteAudio()

void com.hyphenate.chat.EMCallManager.muteRemoteAudio ( boolean  mute)

Mute remote audio

Parameters
mute

◆ muteRemoteVideo()

void com.hyphenate.chat.EMCallManager.muteRemoteVideo ( boolean  mute)

~\chinese mute远端视频

Mute remote video

Parameters
mute

◆ pauseVideoTransfer()

void com.hyphenate.chat.EMCallManager.pauseVideoTransfer ( ) throws HyphenateException

pause real time video data transfer

◆ pauseVoiceTransfer()

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

pause real time voice data transfer

◆ rejectCall()

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

decline phone call

Exceptions
EMNoActiveCallException

◆ removeCallStateChangeListener()

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

remove call state change listener

Parameters
listener

◆ resumeVideoTransfer()

void com.hyphenate.chat.EMCallManager.resumeVideoTransfer ( ) throws HyphenateException

resume real time video data transfer

◆ resumeVoiceTransfer()

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

resume real time voice data transfer

◆ setCameraDataProcessor()

void com.hyphenate.chat.EMCallManager.setCameraDataProcessor ( EMCameraDataProcessor  processor)

Not implemented. This method will be removed in future versions.

Parameters
processor

◆ setCameraFacing()

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

start camera capture

Parameters
facingselect CameraInfo.CAMERA_FACING_BACK or CameraInfo.CAMERA_FACING_FRONT
Exceptions
HyphenateExceptionif cameraIndex not in CameraInfo.CAMERA_FACING_BACK, 或者CameraInfo.CAMERA_FACING_FRONT, got the exception.

◆ setSurfaceView()

synchronized void com.hyphenate.chat.EMCallManager.setSurfaceView ( EMCallSurfaceView  localSurface,
EMCallSurfaceView  oppositeSurface 
)

Must be called when Activity.onCreate, otherwise cannot get surface size accurately

Parameters
localSurfacedefault local SurfaceView
oppositeSurfacedefault remote SurfaceView

The documentation for this class was generated from the following file: