CallSession class

A call session object

Constructors

CallSession(CallOptions opts)

Properties

answeredByUs bool
no setter
callHasEnded bool
no setter
callId String
no setter
candidateSendTries int
getter/setter pair
client Client
no setter
direction CallDirection
no setter
displayName String?
no setter
facingMode String
getter/setter pair
getLocalStreams List<WrappedMediaStream>
no setter
getRemoteStreams List<WrappedMediaStream>
no setter
groupCallId String?
no setter
hangupParty CallParty
getter/setter pair
hangupReason String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
iceGatheringFinished bool
getter/setter pair
ignoreOffer bool
getter/setter pair
invitee String?
getter/setter pair
inviteOrAnswerSent bool
getter/setter pair
inviteTimer Timer?
getter/setter pair
isGroupCall bool
no setter
isLocalVideoMuted bool
no setter
isMicrophoneMuted bool
no setter
isOutgoing bool
no setter
isRemoteOnHold bool
no setter
isRinging bool
no setter
lastError CallError
getter/setter pair
localCandidates List<RTCIceCandidate>
getter/setter pair
localHold bool
getter/setter pair
localPartyId String
no setter
localScreenSharingStream WrappedMediaStream?
no setter
localUserMediaStream WrappedMediaStream?
no setter
makingOffer bool
getter/setter pair
missedCall bool
getter/setter pair
onCallEventChanged → CachedStreamController<CallEvent>
final
onCallHangupNotifierForGroupCalls → CachedStreamController<CallSession>
final
onCallReplaced → CachedStreamController<CallSession>
final
onCallStateChanged → CachedStreamController<CallState>
final
onCallStreamsChanged → CachedStreamController<CallSession>
final
onStreamAdd → CachedStreamController<WrappedMediaStream>
final
onStreamRemoved → CachedStreamController<WrappedMediaStream>
final
opponentDeviceId String?
getter/setter pair
opponentSessionId String?
getter/setter pair
opts CallOptions
getter/setter pair
pc ↔ RTCPeerConnection?
getter/setter pair
remoteAssertedIdentity AssertedIdentity
getter/setter pair
remoteCandidates List<RTCIceCandidate>
getter/setter pair
remoteOnHold bool
getter/setter pair
remotePartyId String?
getter/setter pair
remoteScreenSharingStream WrappedMediaStream?
no setter
remoteSDPStreamMetadata SDPStreamMetadata?
getter/setter pair
remoteUser User?
getter/setter pair
remoteUserMediaStream WrappedMediaStream?
no setter
ringingTimer Timer?
getter/setter pair
room Room
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screensharingEnabled bool
no setter
screensharingSenders List<RTCRtpSender>
getter/setter pair
speakerOn bool
getter/setter pair
state CallState
getter/setter pair
streams List<WrappedMediaStream>
getter/setter pair
successor CallSession?
getter/setter pair
toDeviceSeq int
getter/setter pair
type CallType
no setter
usermediaSenders List<RTCRtpSender>
getter/setter pair
voip VoIP
no setter
waitForLocalAVStream bool
getter/setter pair

Methods

addLocalStream(MediaStream stream, String purpose, {bool addToPeerConnection = true}) Future<void>
answer() Future<void>
answerWithStreams(List<WrappedMediaStream> callFeeds) Future<void>
cleanUp() Future<void>
createDataChannel(String label, RTCDataChannelInit dataChannelDict) → void
deleteAllStreams() Future<void>
deleteFeedByStream(MediaStream stream) Future<void>
deleteStream(WrappedMediaStream stream) Future<void>
fireCallEvent(CallEvent event) → void
gotCallFeedsForAnswer(List<WrappedMediaStream> callFeeds) Future<void>
gotCallFeedsForInvite(List<WrappedMediaStream> callFeeds, [bool requestScreenshareFeed = false]) Future<void>
hangup([String? reason, bool shouldEmit = true]) Future<void>
hasVideoToSend() Future<bool>
returns whether a 1:1 call sender has video tracks
initOutboundCall(CallType type) Future<void>
initWithInvite(CallType type, RTCSessionDescription offer, SDPStreamMetadata? metadata, int lifetime, bool isGroupCall) Future<void>
insertVideoTrackToAudioOnlyStream() Future<void>
isLocalOnHold() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAnsweredElsewhere() Future<void>
onAnswerReceived(RTCSessionDescription answer, SDPStreamMetadata? metadata) Future<void>
onAssertedIdentityReceived(AssertedIdentity identity) → void
onCandidatesReceived(List candidates) Future<void>
onNegotiateReceived(SDPStreamMetadata? metadata, RTCSessionDescription description) Future<void>
onNegotiationNeeded() Future<void>
onRejectReceived(String? reason) Future<void>
onSDPStreamMetadataReceived(SDPStreamMetadata metadata) Future<void>
onSelectAnswerReceived(String? selectedPartyId) Future<void>
placeCallWithStreams(List<WrappedMediaStream> callFeeds, [bool requestScreenshareFeed = false]) Future<void>
reject({String? reason, bool shouldEmit = true}) Future<void>
Reject a call This used to be done by calling hangup, but is a separate method and protocol event as of MSC2746.
removeLocalStream(WrappedMediaStream callFeed) Future<void>
replacedBy(CallSession newCall) → void
restartIce() Future<void>
sendAnswer(RTCSessionDescription answer) Future<void>
sendAnswerCall(Room room, String callId, String sdp, String party_id, {String type = 'answer', String version = voipProtoVersion, String? txid, CallCapabilities? capabilities, SDPStreamMetadata? metadata}) Future<String?>
This event is sent by the callee when they wish to answer the call. callId is a unique identifier for the call. version is the version of the VoIP specification this message adheres to. This specification is version 1. type The type of session description. Must be 'answer'. sdp The SDP text of the session description. party_id The party ID for call, Can be set to client.deviceId.
sendAssertedIdentity(Room room, String callId, String party_id, AssertedIdentity assertedIdentity, {String version = voipProtoVersion, String? txid}) Future<String?>
send AssertedIdentity event
sendCallCandidates(Room room, String callId, String party_id, List<Map<String, dynamic>> candidates, {String version = voipProtoVersion, String? txid}) Future<String?>
This is sent by callers after sending an invite and by the callee after answering. Its purpose is to give the other party additional ICE candidates to try using to communicate.
sendCallNegotiate(Room room, String callId, int lifetime, String party_id, String sdp, {String type = 'offer', String version = voipProtoVersion, String? txid, CallCapabilities? capabilities, SDPStreamMetadata? metadata}) Future<String?>
When local audio/video tracks are added/deleted or hold/unhold, need to createOffer and renegotiation. callId is a unique identifier for the call. version is the version of the VoIP specification this message adheres to. This specification is version 1. party_id The party ID for call, Can be set to client.deviceId.
sendCallReject(Room room, String callId, int lifetime, String party_id, String? reason, {String version = voipProtoVersion, String? txid}) Future<String?>
Reject a call callId is a unique identifier for the call. version is the version of the VoIP specification this message adheres to. This specification is version 1. party_id The party ID for call, Can be set to client.deviceId.
sendCallReplaces(Room room, String callId, String party_id, CallReplaces callReplaces, {String version = voipProtoVersion, String? txid}) Future<String?>
CallReplacesEvent for Transfered calls
sendDTMF(String tones) Future<void>
sendHangupCall(Room room, String callId, String party_id, String? hangupCause, {String version = voipProtoVersion, String? txid}) Future<String?>
This event is sent by the callee when they wish to answer the call. callId The ID of the call this event relates to. version is the version of the VoIP specification this message adheres to. This specification is version 1. party_id The party ID for call, Can be set to client.deviceId.
sendInviteToCall(Room room, String callId, int lifetime, String party_id, String? invitee, String sdp, {String type = 'offer', String version = voipProtoVersion, String? txid, CallCapabilities? capabilities, SDPStreamMetadata? metadata}) Future<String?>
This is sent by the caller when they wish to establish a call. callId is a unique identifier for the call. version is the version of the VoIP specification this message adheres to. This specification is version 1. lifetime is the time in milliseconds that the invite is valid for. Once the invite age exceeds this value, clients should discard it. They should also no longer show the call as awaiting an answer in the UI. type The type of session description. Must be 'offer'. sdp The SDP text of the session description. invitee The user ID of the person who is being invited. Invites without an invitee field are defined to be intended for any member of the room other than the sender of the event. party_id The party ID for call, Can be set to client.deviceId.
sendSDPStreamMetadataChanged(Room room, String callId, String party_id, SDPStreamMetadata metadata, {String version = voipProtoVersion, String? txid}) Future<String?>
Send SdpStreamMetadata Changed event.
sendSelectCallAnswer(Room room, String callId, int lifetime, String party_id, String selected_party_id, {String version = voipProtoVersion, String? txid}) Future<String?>
The calling party sends the party_id of the first selected answer.
setCallState(CallState newState) → void
setLocalVideoMuted(bool muted) Future<void>
setMicrophoneMuted(bool muted) Future<void>
setRemoteOnHold(bool onHold) Future<void>
setScreensharingEnabled(bool enabled) Future<bool>
terminate(CallParty party, String reason, bool shouldEmit) Future<void>
toString() String
A string representation of this object.
inherited
tryRemoveStopedStreams() Future<void>
updateAudioDevice([MediaStreamTrack? track]) Future<void>
updateMuteStatus() Future<void>

Operators

operator ==(Object other) bool
The equality operator.
inherited