DigitalWorldCall
Defined in: src/webrtc/call.ts:355
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?
Extends
Section titled “Extends”TypedEventEmitter<CallEvent,CallEventHandlerMap>
Properties
Section titled “Properties”callId
Section titled “callId”callId:
string
Defined in: src/webrtc/call.ts:357
direction?
Section titled “direction?”
optionaldirection?:CallDirection
Defined in: src/webrtc/call.ts:361
groupCallId?
Section titled “groupCallId?”
optionalgroupCallId?:string
Defined in: src/webrtc/call.ts:429
hangupParty?
Section titled “hangupParty?”
optionalhangupParty?:CallParty
Defined in: src/webrtc/call.ts:359
hangupReason?
Section titled “hangupReason?”
optionalhangupReason?:string
Defined in: src/webrtc/call.ts:360
invitee?
Section titled “invitee?”
optionalinvitee?:string
Defined in: src/webrtc/call.ts:358
isPtt:
boolean=false
Defined in: src/webrtc/call.ts:368
ourPartyId
Section titled “ourPartyId”ourPartyId:
string
Defined in: src/webrtc/call.ts:362
peerConn?
Section titled “peerConn?”
optionalpeerConn?:RTCPeerConnection
Defined in: src/webrtc/call.ts:363
roomId
Section titled “roomId”roomId:
string
Defined in: src/webrtc/call.ts:356
toDeviceSeq
Section titled “toDeviceSeq”toDeviceSeq:
number=0
Defined in: src/webrtc/call.ts:364
Accessors
Section titled “Accessors”hasLocalUserMediaAudioTrack
Section titled “hasLocalUserMediaAudioTrack”Get Signature
Section titled “Get Signature”get hasLocalUserMediaAudioTrack():
boolean
Defined in: src/webrtc/call.ts:549
Returns
Section titled “Returns”boolean
hasLocalUserMediaVideoTrack
Section titled “hasLocalUserMediaVideoTrack”Get Signature
Section titled “Get Signature”get hasLocalUserMediaVideoTrack():
boolean
Defined in: src/webrtc/call.ts:539
Returns
Section titled “Returns”boolean
hasPeerConnection
Section titled “hasPeerConnection”Get Signature
Section titled “Get Signature”get hasPeerConnection():
boolean
Defined in: src/webrtc/call.ts:2976
Returns
Section titled “Returns”boolean
hasRemoteUserMediaAudioTrack
Section titled “hasRemoteUserMediaAudioTrack”Get Signature
Section titled “Get Signature”get hasRemoteUserMediaAudioTrack():
boolean
Defined in: src/webrtc/call.ts:553
Returns
Section titled “Returns”boolean
hasRemoteUserMediaVideoTrack
Section titled “hasRemoteUserMediaVideoTrack”Get Signature
Section titled “Get Signature”get hasRemoteUserMediaVideoTrack():
boolean
Defined in: src/webrtc/call.ts:543
Returns
Section titled “Returns”boolean
localScreensharingFeed
Section titled “localScreensharingFeed”Get Signature
Section titled “Get Signature”get localScreensharingFeed():
CallFeed|undefined
Defined in: src/webrtc/call.ts:571
Returns
Section titled “Returns”CallFeed | undefined
localScreensharingStream
Section titled “localScreensharingStream”Get Signature
Section titled “Get Signature”get localScreensharingStream():
MediaStream|undefined
Defined in: src/webrtc/call.ts:579
Returns
Section titled “Returns”MediaStream | undefined
localUsermediaFeed
Section titled “localUsermediaFeed”Get Signature
Section titled “Get Signature”get localUsermediaFeed():
CallFeed|undefined
Defined in: src/webrtc/call.ts:567
Returns
Section titled “Returns”CallFeed | undefined
localUsermediaStream
Section titled “localUsermediaStream”Get Signature
Section titled “Get Signature”get localUsermediaStream():
MediaStream|undefined
Defined in: src/webrtc/call.ts:575
Returns
Section titled “Returns”MediaStream | undefined
remoteScreensharingFeed
Section titled “remoteScreensharingFeed”Get Signature
Section titled “Get Signature”get remoteScreensharingFeed():
CallFeed|undefined
Defined in: src/webrtc/call.ts:587
Returns
Section titled “Returns”CallFeed | undefined
remoteScreensharingStream
Section titled “remoteScreensharingStream”Get Signature
Section titled “Get Signature”get remoteScreensharingStream():
MediaStream|undefined
Defined in: src/webrtc/call.ts:595
Returns
Section titled “Returns”MediaStream | undefined
remoteUsermediaFeed
Section titled “remoteUsermediaFeed”Get Signature
Section titled “Get Signature”get remoteUsermediaFeed():
CallFeed|undefined
Defined in: src/webrtc/call.ts:583
Returns
Section titled “Returns”CallFeed | undefined
remoteUsermediaStream
Section titled “remoteUsermediaStream”Get Signature
Section titled “Get Signature”get remoteUsermediaStream():
MediaStream|undefined
Defined in: src/webrtc/call.ts:591
Returns
Section titled “Returns”MediaStream | undefined
Get Signature
Section titled “Get Signature”get state():
CallState
Defined in: src/webrtc/call.ts:523
Returns
Section titled “Returns”CallState
Set Signature
Section titled “Set Signature”set state(
state):void
Defined in: src/webrtc/call.ts:527
Parameters
Section titled “Parameters”CallState
Returns
Section titled “Returns”void
Get Signature
Section titled “Get Signature”get type():
CallType
Defined in: src/webrtc/call.ts:533
Returns
Section titled “Returns”CallType
Methods
Section titled “Methods”[captureRejectionSymbol]()?
Section titled “[captureRejectionSymbol]()?”
optional[captureRejectionSymbol]<K>(error,event, …args):void
Defined in: node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/events.d.ts:103
Type Parameters
Section titled “Type Parameters”K
Parameters
Section titled “Parameters”Error
string | symbol
…AnyRest
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TypedEventEmitter.[captureRejectionSymbol]
addListener()
Section titled “addListener()”addListener<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:70
Alias for on.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”answer()
Section titled “answer()”answer(
audio?,video?):Promise<void>
Defined in: src/webrtc/call.ts:1065
Answer a call.
Parameters
Section titled “Parameters”audio?
Section titled “audio?”boolean
video?
Section titled “video?”boolean
Returns
Section titled “Returns”Promise<void>
answerWithCallFeeds()
Section titled “answerWithCallFeeds()”answerWithCallFeeds(
callFeeds):void
Defined in: src/webrtc/call.ts:1118
Parameters
Section titled “Parameters”callFeeds
Section titled “callFeeds”CallFeed[]
Returns
Section titled “Returns”void
callHasEnded()
Section titled “callHasEnded()”callHasEnded():
boolean
Defined in: src/webrtc/call.ts:2067
Returns
Section titled “Returns”boolean
createDataChannel()
Section titled “createDataChannel()”createDataChannel(
label,options):RTCDataChannel
Defined in: src/webrtc/call.ts:493
Create a datachannel using this call’s peer connection.
Parameters
Section titled “Parameters”string
A human readable label for this datachannel
options
Section titled “options”RTCDataChannelInit | undefined
An object providing configuration options for the data channel.
Returns
Section titled “Returns”RTCDataChannel
emit()
Section titled “emit()”Call Signature
Section titled “Call Signature”emit<
T>(event, …args):boolean
Defined in: src/models/typed-event-emitter.ts:86
Synchronously calls each of the listeners registered for the event named
event, in the order they were registered, passing the supplied arguments
to each.
Type Parameters
Section titled “Type Parameters”T extends CallEvent
Parameters
Section titled “Parameters”T
The name of the event to emit
…Parameters<CallEventHandlerMap[T]>
Arguments to pass to the listener
Returns
Section titled “Returns”boolean
true if the event had listeners, false otherwise.
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”emit<
T>(event, …args):boolean
Defined in: src/models/typed-event-emitter.ts:87
Synchronously calls each of the listeners registered for the event named
event, in the order they were registered, passing the supplied arguments
to each.
Type Parameters
Section titled “Type Parameters”T extends CallEvent
Parameters
Section titled “Parameters”T
The name of the event to emit
…Parameters<CallEventHandlerMap[T]>
Arguments to pass to the listener
Returns
Section titled “Returns”boolean
true if the event had listeners, false otherwise.
Inherited from
Section titled “Inherited from”emitPromised()
Section titled “emitPromised()”Call Signature
Section titled “Call Signature”emitPromised<
T>(event, …args):Promise<boolean>
Defined in: src/models/typed-event-emitter.ts:98
Similar to emit but calls all listeners within a Promise.all and returns the promise chain
Type Parameters
Section titled “Type Parameters”T extends CallEvent
Parameters
Section titled “Parameters”T
The name of the event to emit
…Parameters<CallEventHandlerMap[T]>
Arguments to pass to the listener
Returns
Section titled “Returns”Promise<boolean>
true if the event had listeners, false otherwise.
Inherited from
Section titled “Inherited from”TypedEventEmitter.emitPromised
Call Signature
Section titled “Call Signature”emitPromised<
T>(event, …args):Promise<boolean>
Defined in: src/models/typed-event-emitter.ts:102
Similar to emit but calls all listeners within a Promise.all and returns the promise chain
Type Parameters
Section titled “Type Parameters”T extends CallEvent
Parameters
Section titled “Parameters”T
The name of the event to emit
…Parameters<CallEventHandlerMap[T]>
Arguments to pass to the listener
Returns
Section titled “Returns”Promise<boolean>
true if the event had listeners, false otherwise.
Inherited from
Section titled “Inherited from”TypedEventEmitter.emitPromised
eventNames()
Section titled “eventNames()”eventNames(): (
string|symbol)[]
Defined in: node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/events.d.ts:967
Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or Symbols.
import { EventEmitter } from 'node:events';
const myEE = new EventEmitter();myEE.on('foo', () => {});myEE.on('bar', () => {});
const sym = Symbol('symbol');myEE.on(sym, () => {});
console.log(myEE.eventNames());// Prints: [ 'foo', 'bar', Symbol(symbol) ]Returns
Section titled “Returns”(string | symbol)[]
v6.0.0
Inherited from
Section titled “Inherited from”getCurrentCallStats()
Section titled “getCurrentCallStats()”getCurrentCallStats():
Promise<any[] |undefined>
Defined in: src/webrtc/call.ts:917
Returns
Section titled “Returns”Promise<any[] | undefined>
getFeeds()
Section titled “getFeeds()”getFeeds():
CallFeed[]
Defined in: src/webrtc/call.ts:607
Returns an array of all CallFeeds
Returns
Section titled “Returns”CallFeed[]
CallFeeds
getLocalFeeds()
Section titled “getLocalFeeds()”getLocalFeeds():
CallFeed[]
Defined in: src/webrtc/call.ts:615
Returns an array of all local CallFeeds
Returns
Section titled “Returns”CallFeed[]
local CallFeeds
getMaxListeners()
Section titled “getMaxListeners()”getMaxListeners():
number
Defined in: node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/events.d.ts:819
Returns the current max listener value for the EventEmitter which is either
set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.
Returns
Section titled “Returns”number
v1.0.0
Inherited from
Section titled “Inherited from”TypedEventEmitter.getMaxListeners
getOpponentDeviceId()
Section titled “getOpponentDeviceId()”getOpponentDeviceId():
string|undefined
Defined in: src/webrtc/call.ts:503
Returns
Section titled “Returns”string | undefined
getOpponentMember()
Section titled “getOpponentMember()”getOpponentMember():
RoomMember|undefined
Defined in: src/webrtc/call.ts:499
Returns
Section titled “Returns”RoomMember | undefined
getOpponentSessionId()
Section titled “getOpponentSessionId()”getOpponentSessionId():
string|undefined
Defined in: src/webrtc/call.ts:507
Returns
Section titled “Returns”string | undefined
getRemoteAssertedIdentity()
Section titled “getRemoteAssertedIdentity()”getRemoteAssertedIdentity():
AssertedIdentity|undefined
Defined in: src/webrtc/call.ts:519
Returns
Section titled “Returns”AssertedIdentity | undefined
getRemoteFeeds()
Section titled “getRemoteFeeds()”getRemoteFeeds():
CallFeed[]
Defined in: src/webrtc/call.ts:623
Returns an array of all remote CallFeeds
Returns
Section titled “Returns”CallFeed[]
remote CallFeeds
hangup()
Section titled “hangup()”hangup(
reason,suppressEvent):void
Defined in: src/webrtc/call.ts:1156
Hangup a call.
Parameters
Section titled “Parameters”reason
Section titled “reason”CallErrorCode
The reason why the call is being hung up.
suppressEvent
Section titled “suppressEvent”boolean
True to suppress emitting an event.
Returns
Section titled “Returns”void
initStats()
Section titled “initStats()”initStats(
stats,peerId?):void
Defined in: src/webrtc/call.ts:2980
Parameters
Section titled “Parameters”GroupCallStats
peerId?
Section titled “peerId?”string = "unknown"
Returns
Section titled “Returns”void
initWithHangup()
Section titled “initWithHangup()”initWithHangup(
event):void
Defined in: src/webrtc/call.ts:1031
Configure this call from a hangup or reject event. Used by DigitalWorldClient.
Parameters
Section titled “Parameters”The m.call.hangup event
Returns
Section titled “Returns”void
initWithInvite()
Section titled “initWithInvite()”initWithInvite(
event):Promise<void>
Defined in: src/webrtc/call.ts:943
Configure this call from an invite event. Used by DigitalWorldClient.
Parameters
Section titled “Parameters”The m.call.invite event
Returns
Section titled “Returns”Promise<void>
isLocalOnHold()
Section titled “isLocalOnHold()”isLocalOnHold():
boolean
Defined in: src/webrtc/call.ts:1552
Indicates whether we are ‘on hold’ to the remote party (ie. if true, they cannot hear us).
Returns
Section titled “Returns”boolean
true if the other party has put us on hold
isLocalVideoMuted()
Section titled “isLocalVideoMuted()”isLocalVideoMuted():
boolean
Defined in: src/webrtc/call.ts:1485
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.
Returns
Section titled “Returns”boolean
True if the local preview video is muted, else false (including if the call is not set up yet).
isMicrophoneMuted()
Section titled “isMicrophoneMuted()”isMicrophoneMuted():
boolean
Defined in: src/webrtc/call.ts:1519
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.
Returns
Section titled “Returns”boolean
True if the mic is muted, else false (including if the call is not set up yet).
isRemoteOnHold()
Section titled “isRemoteOnHold()”isRemoteOnHold():
boolean
Defined in: src/webrtc/call.ts:1527
Returns
Section titled “Returns”boolean
true if we have put the party on the other side of the call on hold (that is, we are signalling to them that we are not listening)
isScreensharing()
Section titled “isScreensharing()”isScreensharing():
boolean
Defined in: src/webrtc/call.ts:1235
If there is a screensharing stream returns true, otherwise returns false
Returns
Section titled “Returns”boolean
is screensharing
listenerCount()
Section titled “listenerCount()”listenerCount(
event):number
Defined in: src/models/typed-event-emitter.ts:115
Returns the number of listeners listening to the event named event.
Parameters
Section titled “Parameters”EventEmitterEvents | CallEvent
The name of the event being listened for
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”TypedEventEmitter.listenerCount
listeners()
Section titled “listeners()”listeners(
event):Function[]
Defined in: src/models/typed-event-emitter.ts:122
Returns a copy of the array of listeners for the event named event.
Parameters
Section titled “Parameters”EventEmitterEvents | CallEvent
Returns
Section titled “Returns”Function[]
Inherited from
Section titled “Inherited from”noIncomingFeeds()
Section titled “noIncomingFeeds()”noIncomingFeeds():
boolean
Defined in: src/webrtc/call.ts:671
Returns true if there are no incoming feeds, otherwise returns false
Returns
Section titled “Returns”boolean
no incoming feeds
off<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:129
Alias for removeListener
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”on<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:150
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 prependListener method can be used as an alternative to add the event listener to the beginning of the listeners array.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
The name of the event.
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
The callback function
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”onAnsweredElsewhere()
Section titled “onAnsweredElsewhere()”onAnsweredElsewhere(
msg):void
Defined in: src/webrtc/call.ts:2464
Parameters
Section titled “Parameters”MCallAnswer
Returns
Section titled “Returns”void
onAnswerReceived()
Section titled “onAnswerReceived()”onAnswerReceived(
event):Promise<void>
Defined in: src/webrtc/call.ts:1875
Used by DigitalWorldClient.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
onAssertedIdentityReceived()
Section titled “onAssertedIdentityReceived()”onAssertedIdentityReceived(
event):Promise<void>
Defined in: src/webrtc/call.ts:2056
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
once()
Section titled “once()”once<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:169
Adds 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 prependOnceListener method can be used as an alternative to add the event listener to the beginning of the listeners array.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
The name of the event.
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
The callback function
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”onHangupReceived()
Section titled “onHangupReceived()”onHangupReceived(
msg):void
Defined in: src/webrtc/call.ts:2428
Parameters
Section titled “Parameters”MCallHangupReject
Returns
Section titled “Returns”void
onNegotiateReceived()
Section titled “onNegotiateReceived()”onNegotiateReceived(
event):Promise<void>
Defined in: src/webrtc/call.ts:1959
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
onRejectReceived()
Section titled “onRejectReceived()”onRejectReceived(
msg):void
Defined in: src/webrtc/call.ts:2443
Parameters
Section titled “Parameters”MCallHangupReject
Returns
Section titled “Returns”void
onRemoteIceCandidatesReceived()
Section titled “onRemoteIceCandidatesReceived()”onRemoteIceCandidatesReceived(
ev):Promise<void>
Defined in: src/webrtc/call.ts:1831
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
onSDPStreamMetadataChangedReceived()
Section titled “onSDPStreamMetadataChangedReceived()”onSDPStreamMetadataChangedReceived(
event):void
Defined in: src/webrtc/call.ts:2048
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onSelectAnswerReceived()
Section titled “onSelectAnswerReceived()”onSelectAnswerReceived(
event):Promise<void>
Defined in: src/webrtc/call.ts:1933
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
opponentCanBeTransferred()
Section titled “opponentCanBeTransferred()”opponentCanBeTransferred():
boolean
Defined in: src/webrtc/call.ts:511
Returns
Section titled “Returns”boolean
opponentSupportsDTMF()
Section titled “opponentSupportsDTMF()”opponentSupportsDTMF():
boolean
Defined in: src/webrtc/call.ts:515
Returns
Section titled “Returns”boolean
opponentSupportsSDPStreamMetadata()
Section titled “opponentSupportsSDPStreamMetadata()”opponentSupportsSDPStreamMetadata():
boolean
Defined in: src/webrtc/call.ts:1227
Returns true if this.remoteSDPStreamMetadata is defined, otherwise returns false
Returns
Section titled “Returns”boolean
can screenshare
placeCall()
Section titled “placeCall()”placeCall(
audio,video):Promise<void>
Defined in: src/webrtc/call.ts:2810
Place a call to this room.
Parameters
Section titled “Parameters”boolean
boolean
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if you have not specified a listener for ‘error’ events.
Throws
Section titled “Throws”if have passed audio=false.
placeCallWithCallFeeds()
Section titled “placeCallWithCallFeeds()”placeCallWithCallFeeds(
callFeeds,requestScreenshareFeed?):Promise<void>
Defined in: src/webrtc/call.ts:2854
Place a call to this room with call feed.
Parameters
Section titled “Parameters”callFeeds
Section titled “callFeeds”CallFeed[]
to use
requestScreenshareFeed?
Section titled “requestScreenshareFeed?”boolean = false
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if you have not specified a listener for ‘error’ events.
Throws
Section titled “Throws”if have passed audio=false.
placeVideoCall()
Section titled “placeVideoCall()”placeVideoCall():
Promise<void>
Defined in: src/webrtc/call.ts:484
Place a video call to this room.
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”If you have not specified a listener for ‘error’ events.
placeVoiceCall()
Section titled “placeVoiceCall()”placeVoiceCall():
Promise<void>
Defined in: src/webrtc/call.ts:476
Place a voice call to this room.
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”If you have not specified a listener for ‘error’ events.
prependListener()
Section titled “prependListener()”prependListener<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:186
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.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
The name of the event.
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
The callback function
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”TypedEventEmitter.prependListener
prependOnceListener()
Section titled “prependOnceListener()”prependOnceListener<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:202
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.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
The name of the event.
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
The callback function
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”TypedEventEmitter.prependOnceListener
pushLocalFeed()
Section titled “pushLocalFeed()”pushLocalFeed(
callFeed,addToPeerConnection?):void
Defined in: src/webrtc/call.ts:806
Pushes supplied feed to the call
Parameters
Section titled “Parameters”callFeed
Section titled “callFeed”CallFeed
to push
addToPeerConnection?
Section titled “addToPeerConnection?”boolean = true
whether to add the tracks to the peer connection
Returns
Section titled “Returns”void
rawListeners()
Section titled “rawListeners()”rawListeners(
event):Function[]
Defined in: src/models/typed-event-emitter.ts:243
Returns a copy of the array of listeners for the event named eventName,
including any wrappers (such as those created by .once()).
Parameters
Section titled “Parameters”EventEmitterEvents | CallEvent
Returns
Section titled “Returns”Function[]
Inherited from
Section titled “Inherited from”TypedEventEmitter.rawListeners
reject()
Section titled “reject()”reject():
void
Defined in: src/webrtc/call.ts:1176
Reject a call This used to be done by calling hangup, but is a separate method and protocol event as of MSC2746.
Returns
Section titled “Returns”void
removeAllListeners()
Section titled “removeAllListeners()”removeAllListeners(
event?):this
Defined in: src/models/typed-event-emitter.ts:219
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).
Parameters
Section titled “Parameters”event?
Section titled “event?”EventEmitterEvents | CallEvent
The name of the event. If undefined, all listeners everywhere are removed.
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”TypedEventEmitter.removeAllListeners
removeListener()
Section titled “removeListener()”removeListener<
T>(event,listener):this
Defined in: src/models/typed-event-emitter.ts:232
Removes the specified listener from the listener array for the event named event.
Type Parameters
Section titled “Type Parameters”T extends EventEmitterEvents | CallEvent
Parameters
Section titled “Parameters”T
listener
Section titled “listener”Listener<CallEvent, CallEventHandlerMap, T>
Returns
Section titled “Returns”this
a reference to the EventEmitter, so that calls can be chained.
Inherited from
Section titled “Inherited from”TypedEventEmitter.removeListener
removeLocalFeed()
Section titled “removeLocalFeed()”removeLocalFeed(
callFeed):void
Defined in: src/webrtc/call.ts:867
Removes local call feed from the call and its tracks from the peer connection
Parameters
Section titled “Parameters”callFeed
Section titled “callFeed”CallFeed
to remove
Returns
Section titled “Returns”void
replacedBy()
Section titled “replacedBy()”replacedBy(
newCall):void
Defined in: src/webrtc/call.ts:1129
Replace this call with a new call, e.g. for glare resolution. Used by DigitalWorldClient.
Parameters
Section titled “Parameters”newCall
Section titled “newCall”DigitalWorldCall
The new call.
Returns
Section titled “Returns”void
sendDtmfDigit()
Section titled “sendDtmfDigit()”sendDtmfDigit(
digit):void
Defined in: src/webrtc/call.ts:1572
Sends a DTMF digit to the other party
Parameters
Section titled “Parameters”string
The digit (nb. string - ‘#’ and ‘*’ are dtmf too)
Returns
Section titled “Returns”void
sendMetadataUpdate()
Section titled “sendMetadataUpdate()”sendMetadataUpdate():
Promise<void>
Defined in: src/webrtc/call.ts:1597
Returns
Section titled “Returns”Promise<void>
setLocalVideoMuted()
Section titled “setLocalVideoMuted()”setLocalVideoMuted(
muted):Promise<boolean>
Defined in: src/webrtc/call.ts:1425
Set whether our outbound video should be muted or not.
Parameters
Section titled “Parameters”boolean
True to mute the outbound video.
Returns
Section titled “Returns”Promise<boolean>
the new mute state
setMaxListeners()
Section titled “setMaxListeners()”setMaxListeners(
n):this
Defined in: node_modules/.pnpm/@types+node@22.20.0/node_modules/@types/node/events.d.ts:813
By default EventEmitters will print a warning if more than 10 listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners() method allows the limit to be
modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter, so that calls can be chained.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
v0.3.5
Inherited from
Section titled “Inherited from”TypedEventEmitter.setMaxListeners
setMicrophoneMuted()
Section titled “setMicrophoneMuted()”setMicrophoneMuted(
muted):Promise<boolean>
Defined in: src/webrtc/call.ts:1494
Set whether the microphone should be muted or not.
Parameters
Section titled “Parameters”boolean
True to mute the mic.
Returns
Section titled “Returns”Promise<boolean>
the new mute state
setRemoteOnHold()
Section titled “setRemoteOnHold()”setRemoteOnHold(
onHold):void
Defined in: src/webrtc/call.ts:1531
Parameters
Section titled “Parameters”onHold
Section titled “onHold”boolean
Returns
Section titled “Returns”void
setScreensharingEnabled()
Section titled “setScreensharingEnabled()”setScreensharingEnabled(
enabled,opts?):Promise<boolean>
Defined in: src/webrtc/call.ts:1245
Starts/stops screensharing
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
the desired screensharing state
IScreensharingOpts
screen sharing options
Returns
Section titled “Returns”Promise<boolean>
new screensharing state
transfer()
Section titled “transfer()”transfer(
targetUserId):Promise<void>
Defined in: src/webrtc/call.ts:2604
Parameters
Section titled “Parameters”targetUserId
Section titled “targetUserId”string
Returns
Section titled “Returns”Promise<void>
transferToCall()
Section titled “transferToCall()”transferToCall(
transferTargetCall):Promise<void>
Defined in: src/webrtc/call.ts:2630
Parameters
Section titled “Parameters”transferTargetCall
Section titled “transferTargetCall”DigitalWorldCall
Returns
Section titled “Returns”Promise<void>
updateLocalUsermediaStream()
Section titled “updateLocalUsermediaStream()”updateLocalUsermediaStream(
stream,forceAudio?,forceVideo?):Promise<void>
Defined in: src/webrtc/call.ts:1350
Replaces/adds the tracks from the passed stream to the localUsermediaStream
Parameters
Section titled “Parameters”stream
Section titled “stream”MediaStream
to use a replacement for the local usermedia stream
forceAudio?
Section titled “forceAudio?”boolean = false
forceVideo?
Section titled “forceVideo?”boolean = false
Returns
Section titled “Returns”Promise<void>