STWCallWithAudioSinkApi

object STWCallWithAudioSinkApi

This api is the interface to start/receive any VoIp call with the Audio sink feature.

Audio sink : StreamWide SDK will not play the received audio in the session and will not capture audio from the Mic or any audio input, the SDK will share the audio stream.

Note :

    - Play :  receive audio in the session (developer will be able to receive a ShortArray for the incoming audio).

    - Capture : push(write) audio in the session (developer will be able to push audio from any audion input he need(Mic, audio file..)).

Functions

Link copied to clipboard
@ExperimentalCoroutinesApi
fun acceptCall(context: Context, call: STWVCall): Flow<STWAudioSink>

Call this method to accept a new PTT call.

fun acceptCall(    context: Context,     call: STWVCall,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to accept an incoming VoIP call

Link copied to clipboard
fun connectChannel(    context: Context,     channelId: String,     isVisitorChannel: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to connect to a channel.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun connectFlowChannel(    context: Context,     channelId: String,     isVisitorChannel: Boolean): Flow<STWAudioSink>

Call this method to connect to a channel.

Link copied to clipboard
fun getCaptureAudioFormat(vCall: STWVCall): AudioFormat?

Call this method to get the AudioFormat for the given call. This method get the audio format for the Play. Do not call this method before the ready event, else you receive null.

Link copied to clipboard
fun getPlayAudioFormat(vCall: STWVCall): AudioFormat?

Call this method to get the AudioFormat for the given call. This method get the audio format for the Play. Do not call this method before the ready event, else you receive null.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun joinAudioConferenceCall(context: Context, threadId: String): Flow<STWAudioSink>

Call this method to start a new conference call

fun joinAudioConferenceCall(    context: Context,     threadId: String,     completion: CompletionCallback,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to join an audio conference call from existing conversation Note the audio sink feature will be ENABLED by default when using this method.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun joinFlowPTTCall(context: Context, threadId: String): Flow<STWAudioSink>

Call this method to join a PTT call.

Link copied to clipboard
fun joinPTTCall(    context: Context,     threadId: String,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to join a group call.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startCallOut(    context: Context,     user: String,     isAnonymous: Boolean): Flow<STWAudioSink>

Call this method to start a new call out

fun startCallOut(    context: Context,     user: String,     isAnonymous: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a Cal out call, Note the audio sink feature will be ENABLED by default when using this method.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startConferenceCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean): Flow<STWAudioSink>

Call this method to start a new conference call

fun startConferenceCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new Conference call Note the audio sink feature will be ENABLED by default when using this method.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startEmergencyAmbientListeningCall(    context: Context,     threadId: String,     threadName: String,     priority: Int): Flow<STWAudioSink>

Call this method to start a new emergency Ambient listening call

fun startEmergencyAmbientListeningCall(    context: Context,     threadId: String,     threadName: String,     priority: Int,     completion: CompletionCallback,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new Emergency Ambient Listening call.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startFreeCall(    context: Context,     user: String,     priority: Int): Flow<STWAudioSink>

Call this method to start a new audio VoIP call

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startPTTCall(    context: Context,     threadId: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean): Flow<STWAudioSink>

Call this method to start a new PTT call,

@ExperimentalCoroutinesApi
fun startPTTCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean): Flow<STWAudioSink>

Call this method to start a new PTT call

fun startPTTCall(    context: Context,     threadId: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new PTT call, Note the audio sink feature will be ENABLED by default when using this method.

fun startPTTCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new PTT call Note the audio sink feature will be ENABLED by default when using this method.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startPTTEmergency(    context: Context,     threadName: String,     priority: Int,     needRequestMediaBurst: Boolean,     fallback: FallbackCallback? = null): Flow<STWAudioSink>

Call this method to start a new emergency PTT call

fun startPTTEmergency(    context: Context,     threadName: String,     priority: Int,     needRequestMediaBurst: Boolean,     completion: CompletionCallback?,     fallback: FallbackCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new Emergency PTT call

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startPTTEmergencyWithConnectedChannel(    context: Context,     recipients: String,     threadName: String,     priority: Int,     fallback: FallbackCallback): Flow<STWAudioSink>

Call this method to start a new emergency PTT call with adding the recipients of the active channel

fun startPTTEmergencyWithConnectedChannel(    context: Context,     recipients: String,     threadName: String,     priority: Int,     completion: CompletionCallback,     fallback: FallbackCallback,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Start new emergency alert call to the recipients include the member of selected channel

Link copied to clipboard
@ExperimentalCoroutinesApi
fun startVideoCall(    context: Context,     user: String,     priority: Int): Flow<STWAudioSink>

Call this method to start a new video call

fun startVideoCall(    context: Context,     user: String,     priority: Int,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a video call, Note the audio sink feature will be ENABLED by default when using this method.