Construct a new Matrix Call.
Config options.
Private
_statePrivate
Optional
callPrivate
Optional
callPrivate
Optional
callPrivate
candidatePrivate
candidatePrivate
candidatesPrivate
Readonly
clientOptional
directionPrivate
feedsPrivate
Optional
Readonly
forceTURNOptional
groupOptional
hangupOptional
hangupPrivate
Optional
icePrivate
Optional
icePrivate
ignorePrivate
invitePrivate
Optional
inviteOptional
inviteePrivate
Readonly
isPrivate
isPrivate
makingPrivate
Optional
opponentPrivate
Optional
opponentPrivate
Optional
opponentPrivate
Optional
opponentPrivate
opponentPrivate
Optional
opponentPrivate
Optional
opponentOptional
peerPrivate
Optional
remotePrivate
remotePrivate
remotePrivate
Optional
remoteSDPStreamPrivate
Readonly
removePrivate
Optional
responsePrivate
statsPrivate
Optional
stopPrivate
Optional
successorPrivate
transceiversPrivate
Readonly
turnPrivate
waitPrivate
hasPrivate
hasPrivate
addPrivate
addAlias for TypedEventEmitter#on.
Private
checkPrivate
choosePrivate
collectPrivate
createCreate a datachannel using this call's peer connection.
A human readable label for this datachannel
An object providing configuration options for the data channel.
Private
createPrivate
createPrivate
deletePrivate
deletePrivate
deletePrivate
discardSynchronously calls each of the listeners registered for the event named
event
, in the order they were registered, passing the supplied arguments
to each.
The name of the event to emit
Rest
...args: Parameters<CallEventHandlerMap[T]>Arguments to pass to the listener
true
if the event had listeners, false
otherwise.
Rest
...args: Parameters<CallEventHandlerMap[T]>Similar to emit
but calls all listeners within a Promise.all
and returns the promise chain
The name of the event to emit
Rest
...args: Parameters<CallEventHandlerMap[T]>Arguments to pass to the listener
true
if the event had listeners, false
otherwise.
Rest
...args: Parameters<CallEventHandlerMap[T]>Private
getPrivate
getPrivate
getGenerates and returns localSDPStreamMetadata
localSDPStreamMetadata
Private
getThis method removes all video/rtx codecs from screensharing video transceivers. This is necessary since they can cause problems. Without this the following steps should produce an error: Chromium calls Firefox Firefox answers Firefox starts screen-sharing Chromium starts screen-sharing Call crashes for Chromium with: [96685:23:0518/162603.933321:ERROR:webrtc_video_engine.cc(3296)] RTX codec (PT=97) mapped to PT=96 which is not in the codec list. [96685:23:0518/162603.933377:ERROR:webrtc_video_engine.cc(1171)] GetChangedRecvParameters called without any video codecs. [96685:23:0518/162603.933430:ERROR:sdp_offer_answer.cc(4302)] Failed to set local video description recv parameters for m-section with mid='2'. (INVALID_PARAMETER)
Private
getPrivate
gotPrivate
gotPrivate
gotInternal
Private
gotHangup a call.
The reason why the call is being hung up.
True to suppress emitting an event.
Private
initConfigure this call from a hangup or reject event. Used by MatrixClient.
The m.call.hangup event
Configure this call from an invite event. Used by MatrixClient.
The m.call.invite event
Check if local video is muted.
If there are multiple video tracks, all of the tracks need to be muted for this to return true. This means if there are no video tracks, this will return true.
True if the local preview video is muted, else false (including if the call is not set up yet).
Check if the microphone is muted.
If there are multiple audio tracks, all of the tracks need to be muted for this to return true. This means if there are no audio tracks, this will return true.
True if the mic is muted, else false (including if the call is not set up yet).
Returns the number of listeners listening to the event named event
.
The name of the event being listened for
Returns a copy of the array of listeners for the event named event
.
Private
mungeAlias for TypedEventEmitter#removeListener
Adds the listener
function to the end of the listeners array for the
event named event
.
No checks are made to see if the listener
has already been added. Multiple calls
passing the same combination of event
and listener
will result in the listener
being added, and called, multiple times.
By default, event listeners are invoked in the order they are added. The TypedEventEmitter#prependListener method can be used as an alternative to add the event listener to the beginning of the listeners array.
The name of the event.
The callback function
a reference to the EventEmitter
, so that calls can be chained.
Used by MatrixClient.
Private
onPrivate
onPrivate
onPrivate
onPrivate
onPrivate
onAdds a one-time listener
function for the event named event
. The
next time event
is triggered, this listener is removed and then invoked.
Returns a reference to the EventEmitter
, so that calls can be chained.
By default, event listeners are invoked in the order they are added. The TypedEventEmitter#prependOnceListener method can be used as an alternative to add the event listener to the beginning of the listeners array.
The name of the event.
The callback function
a reference to the EventEmitter
, so that calls can be chained.
Private
partyPrivate
placePlace a call to this room with call feed.
to use
if you have not specified a listener for 'error' events.
if have passed audio=false.
Adds the listener
function to the beginning of the listeners array for the
event named event
.
No checks are made to see if the listener
has already been added. Multiple calls
passing the same combination of event
and listener
will result in the listener
being added, and called, multiple times.
The name of the event.
The callback function
a reference to the EventEmitter
, so that calls can be chained.
Adds a one-timelistener
function for the event named event
to the beginning of the listeners array.
The next time event
is triggered, this listener is removed, and then invoked.
The name of the event.
The callback function
a reference to the EventEmitter
, so that calls can be chained.
Pushes supplied feed to the call
to push
whether to add the tracks to the peer connection
Private
pushPrivate
pushPrivate
pushThis method is used ONLY if the other client doesn't support sending SDPStreamMetadata
Private
queueQueue a candidate to be sent
The candidate to queue up, or null if candidates have finished being generated and end-of-candidates should be signalled
Private
queuePrivate
queueReturns a copy of the array of listeners for the event named eventName
,
including any wrappers (such as those created by .once()
).
Removes all listeners, or those of the specified event
.
It is bad practice to remove listeners added elsewhere in the code,
particularly when the EventEmitter
instance was created by some other
component or module (e.g. sockets or file streams).
Optional
event: EventEmitterEvents | CallEventThe name of the event. If undefined, all listeners everywhere are removed.
a reference to the EventEmitter
, so that calls can be chained.
Removes the specified listener
from the listener array for the event named event
.
a reference to the EventEmitter
, so that calls can be chained.
Removes local call feed from the call and its tracks from the peer connection
to remove
Replace this call with a new call, e.g. for glare resolution. Used by MatrixClient.
The new call.
Private
sendPrivate
sendPrivate
sendStarts/stops screensharing
the desired screensharing state
Optional
opts: IScreensharingOptsscreen sharing options
new screensharing state
Private
setStarts/stops screensharing Should be used ONLY if the opponent doesn't support SDPStreamMetadata
the desired screensharing state
Optional
opts: IScreensharingOptsscreen sharing options
new screensharing state
Private
shouldPrivate
stopPrivate
terminateReplaces/adds the tracks from the passed stream to the localUsermediaStream
to use a replacement for the local usermedia stream
Private
updatePrivate
updatePrivate
upgradePrivate
wrappedGenerated using TypeDoc
Typed Event Emitter class which can act as a Base Model for all our model and communication events. This makes it much easier for us to distinguish between events, as we now need to properly type this, so that our events are not stringly-based and prone to silly typos.
Type parameters:
Events
- List of all events emitted by thisTypedEventEmitter
. Normally an enum type.Arguments
- A ListenerMap type providing mappings from event names to listener types.SuperclassArguments
- TODO: not really sure. Alternative listener mappings, I think? But only honoured for.emit
?