Suggestions

close search

StringeeCall2 class

Represents a voice, video call. Used to capture an audio-video stream from the device's microphone and camera for use to make or answer a call.


Constructors


StringeeCall2(StringeeClient client, String from, String to)

Create a new StringeeCall2.


Properties


idString?

It's the unique identification of the call on Stringee system.

serialint?

This property is only available on Ios. When you use the StringeeX API, the call can be routed to the client multiple times. This property indicates the number of times the call is being routed.

fromString?

It's the Caller's id.

fromAliasString?

It's the Caller's alias.

toString?

It's the Callee's id.

toAliasString?

It's the Callee's alias.

callTypeStringeeCallType?

It's type of call

isVideoCallbool

Whether the call is a video call:

customDataFromYourServerString?

It's custom data received from other user.

videoQualityVideoQuality

It's quality of local stream.


Methods


StringcustomDataFromYourServer

Set custom data for sending to other user.

boolisVideoCall

Set a call is a video call before make call.

VideoQualityvideoQuality

Set video quality for local stream.

registerEvent(StringeeCall2Listener call2Listener)void

Register to listen to events from StringeeCall.

makeCall()Map<dynamic, dynamic>

Make a call.

initAnswer()Map<dynamic, dynamic>

Initializes an answer. Must be called before answering a call.

answer()Map<dynamic, dynamic>

Answers a call.

hangup()Map<dynamic, dynamic>

Terminates a call.

reject()Map<dynamic, dynamic>

Reject a call.

sendDtmf(String dtmf)Map<dynamic, dynamic>

Sends a DTMF code.

sendCallInfo(Map<dynamic, dynamic> callInfo)Map<dynamic, dynamic>

Sends any data to other clients.

getCallStats()Map<dynamic, dynamic>

Get the call's statistics. If successful return StringeeCallStats in callback['stats']:

mute(bool mute)Map<dynamic, dynamic>

Toggle audio on or off.

enableVideo(bool enableVideo)Map<dynamic, dynamic>

Enables or disables the local stream.

setSpeakerphoneOn(bool speakerPhoneOn)Map<dynamic, dynamic>

Set the audio output mode. If you want to use the device loudspeaker for playing audio, call the setSpeakerphoneOn(true) method. Otherwise, call the setSpeakerphoneOn(false) method to use headset speaker for playing audio.

switchCamera({String? cameraId})Map<dynamic, dynamic>

Switches the device's camera. By default, Stringee SDK uses the front camera.

resumeVideo()Map<dynamic, dynamic>

This method is only available on Android. When lost local stream then call resumeVideo to resume local stream in Android.

setMirror(bool isLocal, bool isMirror)Map<dynamic, dynamic>

This method is only available on Android. Set local stream like a mirror or not in Android.

setAutoSendTrackMediaStateChangeEvent(bool on)Map<dynamic, dynamic>

Set auto send track media state change event to other user.

setBluetoothScoOn(bool bluetoothScoOn)Map<dynamic, dynamic>

This method is only available on Android. Set the audio output mode. If you want to use the Bluetooth device for playing audio, call the setBluetoothScoOn(true) method. Otherwise, call the setSpeakerphoneOn(false) method to return to use the previous audio device for playing audio.

snapShot()Map<dynamic, dynamic>

Snap shot local stream. If successful return a MemoryImage in callBack['image'].

destroy()void

Close event stream.