public class StringeeCall
Represents a voice or video call.
| Constructors | |
|---|---|
Constructor |
StringeeCall(StringeeClient client)Creates a StringeeCall instance. |
| Properties | |
|---|---|
String? |
idCall id. |
int? |
serialCall serial. |
String? |
fromCaller id. |
String? |
toCallee id. |
String? |
fromAliasCaller alias. |
String? |
toAliasCallee alias. |
bool |
isVideoCallWhether this is a video call. |
StringeeCallType? |
callTypeCall direction and endpoint type. |
String? |
customDataFromYourServerCustom data received from your server. |
StreamController<dynamic> |
eventStreamControllerStream of call events. |
| Events | |
|---|---|
StringeeCallEvents |
didChangeSignalingStateInvoked when signaling state changes; body is StringeeSignalingState. |
StringeeCallEvents |
didChangeMediaStateInvoked when media state changes; body is StringeeMediaState. |
StringeeCallEvents |
didReceiveCallInfoInvoked when custom call info is received; body is a map. |
StringeeCallEvents |
didHandleOnAnotherDeviceInvoked when the call is handled on another device. |
StringeeCallEvents |
didReceiveLocalStreamInvoked when the local stream is available. |
StringeeCallEvents |
didReceiveRemoteStreamInvoked when the remote stream is available. |
| 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. |
StringeeCall(StringeeClient client) |
|---|
| Creates a StringeeCall instance. |
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. |
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. |
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. |