DirectCall

interface DirectCall

DirectCall

Since

0.6.0

Functions

accept
Link copied to clipboard
abstract fun accept(params: AcceptParams?)

Accepts call.

captureLocalVideoView
Link copied to clipboard
abstract fun captureLocalVideoView(handler: CaptureVideoViewHandler?)

Captures local video view.

captureRemoteVideoView
Link copied to clipboard
abstract fun captureRemoteVideoView(handler: CaptureVideoViewHandler?)

Captures remote video view.

deleteAllCustomItems
Link copied to clipboard
abstract fun deleteAllCustomItems(handler: CustomItemsHandler?)

Deletes all custom items.

deleteCustomItems
Link copied to clipboard
abstract fun deleteCustomItems(customItemKeys: Set<String>?, handler: CustomItemsHandler?)

Deletes custom items.

end
Link copied to clipboard
abstract fun end()

Ends call.

fetchBluetoothDevices
Link copied to clipboard
abstract fun fetchBluetoothDevices()
hold
Link copied to clipboard
abstract fun hold(handler: CompletionHandler?)

Holds the active call.

muteMicrophone
Link copied to clipboard
abstract fun muteMicrophone(): Boolean

Mutes microphone.

removeConnectionQualityListener
Link copied to clipboard
abstract fun removeConnectionQualityListener()

Removes the listener for connection quality and its monitoring modes.

resumeVideoCapturer
Link copied to clipboard
abstract fun resumeVideoCapturer()

Connects the device camera and Sendbird Calls SDK to stream video.

selectAudioDevice
Link copied to clipboard
abstract fun selectAudioDevice(audioDevice: AudioDevice, handler: CompletionHandler?)

Selects audio device.

selectVideoDevice
Link copied to clipboard
abstract fun selectVideoDevice(videoDevice: VideoDevice, handler: CompletionHandler?)

Selects VideoDevice.

setConnectionQualityListener
Link copied to clipboard
abstract fun setConnectionQualityListener(mode: ConnectionQualityMonitoringMode, listener: ConnectionQualityListener)

Sets the listener for connection quality and its monitoring modes.

setListener
Link copied to clipboard
abstract fun setListener(listener: DirectCallListener?)

Sets DirectCall listener.

setLocalVideoView
Link copied to clipboard
abstract fun setLocalVideoView(videoView: SendBirdVideoView?)

Sets local video view.

setRemoteVideoView
Link copied to clipboard
abstract fun setRemoteVideoView(videoView: SendBirdVideoView?)

Sets remote video view.

startRecording
Link copied to clipboard
abstract fun startRecording(options: RecordingOptions, handler: RecordingStartedHandler?)

Starts a media recording session of a direct call. Only one ongoing recording session is allowed. It requires API level 18 or higher.

startScreenShare
Link copied to clipboard
abstract fun startScreenShare(mediaProjectionPermissionResultData: Intent, handler: CompletionHandler?)

Starts the screen share of the local user.

startVideo
Link copied to clipboard
abstract fun startVideo()

Starts video.

stopRecording
Link copied to clipboard
abstract fun stopRecording(recordingId: String): Boolean

Stops a media recording session with the specified recordingId, and depending on the result of the recording, calls the methods of com.sendbird.calls.handler.RecordingListener. It requires API level 18 or higher.

stopScreenShare
Link copied to clipboard
abstract fun stopScreenShare(handler: CompletionHandler?)

Stops the screen share of the local user.

stopVideo
Link copied to clipboard
abstract fun stopVideo()

Stops video.

switchCamera
Link copied to clipboard
abstract fun switchCamera(handler: CompletionHandler?)

Toggles the selection between the front and the back camera. In case of more than two cameras, the next camera will be selected. If the last camera is already selected, the first one will be selected again.

unhold
Link copied to clipboard
abstract fun unhold(force: Boolean, handler: CompletionHandler?)

Removes the hold that you put on a call.

unmuteMicrophone
Link copied to clipboard
abstract fun unmuteMicrophone(): Boolean

Unmutes microphone.

updateCustomItems
Link copied to clipboard
abstract fun updateCustomItems(customItems: Map<String, String>, handler: CustomItemsHandler?)

Updates custom items.

Properties

availableAudioDevices
Link copied to clipboard
abstract val availableAudioDevices: Set<AudioDevice>

Gets available audio devices.

availableVideoDevices
Link copied to clipboard
abstract val availableVideoDevices: List<VideoDevice>

Gets available video devices.

callee
Link copied to clipboard
abstract val callee: DirectCallUser?

Gets callee.

caller
Link copied to clipboard
abstract val caller: DirectCallUser?

Gets caller.

callId
Link copied to clipboard
abstract val callId: String?

Gets call ID.

callLog
Link copied to clipboard
abstract val callLog: DirectCallLog?

Gets call log.

currentAudioDevice
Link copied to clipboard
abstract val currentAudioDevice: AudioDevice?

Gets current audio device.

currentVideoDevice
Link copied to clipboard
abstract val currentVideoDevice: VideoDevice?

Gets current video device.

customItems
Link copied to clipboard
abstract val customItems: Map<String, String>

Gets custom items of this DirectCall instance.

duration
Link copied to clipboard
abstract val duration: Long

Gets call duration(ms).

endedBy
Link copied to clipboard
abstract val endedBy: DirectCallUser?

Gets ender.

endResult
Link copied to clipboard
abstract val endResult: DirectCallEndResult

Gets end result.

isEnded
Link copied to clipboard
abstract val isEnded: Boolean

Is ended.

isLocalAudioEnabled
Link copied to clipboard
abstract val isLocalAudioEnabled: Boolean

Is local audio enabled.

isLocalScreenShareEnabled
Link copied to clipboard
abstract val isLocalScreenShareEnabled: Boolean

Indicates whether the local user's screen is being shared.

isLocalVideoEnabled
Link copied to clipboard
abstract val isLocalVideoEnabled: Boolean

Is local video enabled.

isOngoing
Link copied to clipboard
abstract val isOngoing: Boolean

Is ongoing.

isOnHold
Link copied to clipboard
abstract val isOnHold: Boolean

Indicates whether the call is on hold by either a callee or a caller, or by both.

isRemoteAudioEnabled
Link copied to clipboard
abstract val isRemoteAudioEnabled: Boolean

Is remote audio enabled.

isRemoteVideoEnabled
Link copied to clipboard
abstract val isRemoteVideoEnabled: Boolean

Is remote video enabled.

isVideoCall
Link copied to clipboard
abstract val isVideoCall: Boolean

Is video call.

localRecordingStatus
Link copied to clipboard
abstract val localRecordingStatus: RecordingStatus

Gets local recording status.

localUser
Link copied to clipboard
abstract val localUser: DirectCallUser?

Gets local user.

myRole
Link copied to clipboard
abstract val myRole: DirectCallUserRole?

Gets my role.

remoteRecordingStatus
Link copied to clipboard
abstract val remoteRecordingStatus: RecordingStatus

Gets remote recording status.

remoteUser
Link copied to clipboard
abstract val remoteUser: DirectCallUser?

Gets remote user.

ringingSource
Link copied to clipboard
abstract val ringingSource: RingingSource?

Enum value indicating where the DirectCall's dial event came from.

startedAt
Link copied to clipboard
abstract val startedAt: Long

Gets call started at(ms).