Private
constructorPrivate
_callPrivate
activePrivate
Readonly
clientPrivate
encryptionPrivate
Optional
expiryPrivate
Optional
keysPrivate
Optional
lastPrivate
Optional
makePrivate
managePrivate
Optional
memberPrivate
membershipPrivate
needPrivate
relativeReadonly
roomPrivate
setPrivate
updateThe callId (sessionId) of the call.
It can be undefined since the callId is only known once the first membership joins. The callId is the property that, per definition, groups memberships into one call.
Alias for TypedEventEmitter#on.
Synchronously 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<MatrixRTCSessionEventHandlerMap[T]>Arguments to pass to the listener
true
if the event had listeners, false
otherwise.
Rest
...args: Parameters<MatrixRTCSessionEventHandlerMap[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<MatrixRTCSessionEventHandlerMap[T]>Arguments to pass to the listener
true
if the event had listeners, false
otherwise.
Rest
...args: Parameters<MatrixRTCSessionEventHandlerMap[T]>A map of keys used to encrypt and decrypt (we are using a symmetric cipher) given participant's media. This also includes our own key
Private
getAnnounces this user and device as joined to the MatrixRTC session, and continues to update the membership event to keep it valid until leaveRoomSession() is called This will not subscribe to updates: remember to call subscribe() separately if desired. This method will return immediately and the session will be joined in the background.
The list of foci to set as currently active in the call member event
Optional
manageMediaKeys: booleanIf true, generate and share a a media key for this participant, and emit MatrixRTCSessionEvent.EncryptionKeyChanged when media keys for other participants become available.
Announces this user and device as having left the MatrixRTC session and stops scheduled updates. This will not unsubscribe from updates: remember to call unsubscribe() separately if desired. The membership update required to leave the session will retry if it fails. Without network connection the promise will never resolve. A timeout can be provided so that there is a guarantee for the promise to resolve.
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
makeConstructs our own membership
Optional
prevMembership: CallMembershipThe previous value of our call membership, if any
Private
makeMakes a new membership list given the old list alonng with this user's previous membership event (if any) and this device's previous membership (if any)
Optional
myCallMemberEvent: MatrixEventOptional
myPrevMembership: CallMembershipPrivate
makePrivate
membershipReturns true if our membership event needs to be updated
Optional
myPrevMembershipData: CallMembershipDataOptional
myPrevMembership: CallMembershipAlias 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.
Private
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.
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.
Returns 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 | MatrixRTCSessionEventThe 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.
Private
requestPrivate
sendPrivate
setSets an encryption key at a specified index for a participant. The encryption keys for the local participanmt are also stored here under the user and device ID of the local participant.
The user ID of the participant
Device ID of the participant
The index of the key to set
The string represenation of the key to set in base64
If true, delay before emitting a key changed event. Useful when setting encryption keys for the local participant to allow time for the key to be distributed.
Private
setPrivate
triggerPrivate
updateStatic
callReturns all the call memberships for a room, oldest first
Static
roomReturn the MatrixRTC session for the room, whether there are currently active members or not
Generated using TypeDoc
A MatrixRTCSession manages the membership & properties of a MatrixRTC session. This class doesn't deal with media at all, just membership & properties of a session.