Suggestions

close search

StringeeCall2

public class StringeeCall2



Represents a Call2 voice or video call with video track events.



Summary


Constructors
Constructor StringeeCall2(StringeeClient client)

Creates a StringeeCall2 instance.

Properties
String? id

Call id.

int? serial

Call serial.

String? from

Caller id.

String? to

Callee id.

String? fromAlias

Caller alias.

String? toAlias

Callee alias.

bool isVideoCall

Whether this is a video call.

StringeeCallType? callType

Call direction and endpoint type.

String? customDataFromYourServer

Custom data received from your server.

StreamController<dynamic> eventStreamController

Stream of call events.

Events
StringeeCallEvents didChangeSignalingState

Invoked when signaling state changes; body is StringeeSignalingState.

StringeeCallEvents didChangeMediaState

Invoked when media state changes; body is StringeeMediaState.

StringeeCallEvents didReceiveCallInfo

Invoked when custom call info is received; body is a map.

StringeeCallEvents didHandleOnAnotherDevice

Invoked when the call is handled on another device.

StringeeCallEvents didReceiveLocalStream

Invoked when the local stream is available.

StringeeCallEvents didReceiveRemoteStream

Invoked when the remote stream is available.

StringeeCall2Events didAddVideoTrack

Invoked when a video track is added; body is StringeeVideoTrack.

StringeeCall2Events didRemoveVideoTrack

Invoked when a video track is removed; body is StringeeVideoTrack.

Public methods
Future<Map<dynamic, dynamic>> makeCall(Map<dynamic, dynamic> parameters)

Makes an outgoing call with custom parameters.

Future<Map<dynamic, dynamic>> makeCallFromParams(MakeCallParams params)

Makes an outgoing call with typed MakeCallParams.

Future<Map<dynamic, dynamic>> initAnswer()

Sends ringing state before answering an incoming call.

Future<Map<dynamic, dynamic>> answer()

Answers the current incoming call.

Future<Map<dynamic, dynamic>> hangup()

Hangs up the current call.

Future<Map<dynamic, dynamic>> reject()

Rejects the current incoming call.

Future<Map<dynamic, dynamic>> sendDtmf(String dtmf)

Sends DTMF digits during the current call.

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

Sends custom call info to the remote participant.

Future<Map<dynamic, dynamic>> getCallStats()

Gets media statistics for the current call.

Future<Map<dynamic, dynamic>> mute(bool mute)

Mutes or unmutes the local audio stream.

Future<Map<dynamic, dynamic>> enableVideo(bool enableVideo)

Enables or disables the local video stream.

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

Switches to another camera.

Future<Map<dynamic, dynamic>> resumeVideo()

Resumes the local video stream on Android.

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

Sets mirror mode for the local or remote video renderer on Android.

void destroy()

Cancels native event subscription and closes the call event stream.

Constructors


StringeeCall2(StringeeClient client)
Creates a StringeeCall2 instance.

Properties


id
Call id.
serial
Call serial.
from
Caller id.
to
Callee id.
fromAlias
Caller alias.
toAlias
Callee alias.
isVideoCall
Whether this is a video call.
callType
Call direction and endpoint type.
customDataFromYourServer
Custom data received from your server.
eventStreamController
Stream of call events.

Events


didChangeSignalingState
Invoked when signaling state changes; body is StringeeSignalingState.
didChangeMediaState
Invoked when media state changes; body is StringeeMediaState.
didReceiveCallInfo
Invoked when custom call info is received; body is a map.
didHandleOnAnotherDevice
Invoked when the call is handled on another device.
didReceiveLocalStream
Invoked when the local stream is available.
didReceiveRemoteStream
Invoked when the remote stream is available.
didAddVideoTrack
Invoked when a video track is added; body is StringeeVideoTrack.
didRemoveVideoTrack
Invoked when a video track is removed; body is StringeeVideoTrack.

Public methods


makeCall(Map<dynamic, dynamic> parameters)
Makes an outgoing call with custom parameters.
makeCallFromParams(MakeCallParams params)
Makes an outgoing call with typed MakeCallParams.
initAnswer()
Sends ringing state before answering an incoming call.
answer()
Answers the current incoming call.
hangup()
Hangs up the current call.
reject()
Rejects the current incoming call.
sendDtmf(String dtmf)
Sends DTMF digits during the current call.
sendCallInfo(Map<dynamic, dynamic> callInfo)
Sends custom call info to the remote participant.
getCallStats()
Gets media statistics for the current call.
mute(bool mute)
Mutes or unmutes the local audio stream.
enableVideo(bool enableVideo)
Enables or disables the local video stream.
switchCamera({String? cameraId})
Switches to another camera.
resumeVideo()
Resumes the local video stream on Android.
setMirror(bool isLocal, bool isMirror)
Sets mirror mode for the local or remote video renderer on Android.
destroy()
Cancels native event subscription and closes the call event stream.