the Jingle Session ID - random string which identifies the session
our JID
remote peer JID
The XMPP connection instance.
the media constraints object passed to createOffer/Answer, as defined by the WebRTC standard
The {@code RTCConfiguration} to use for the WebRTC peer connection.
indicates whether this instance is meant to be used in a direct, peer to peer connection or false if it's a JVB connection.
indicates if it will be the side which initiates the session.
The XMPP connection.
When dripping is used, stores ICE candidates which are to be sent.
Indicates whether this instance is an initiator or an answerer of the Jingle session.
Our JID.
The media constraints object passed to the PeerConnection onCreateAnswer/Offer.
The {@code RTCConfiguration} object passed to the PeerConnection's constructor.
The JID of the remote peer.
The Jingle session identifier.
Jingle session state - uninitialized until initialize is called
Whether to use dripping or not. Dripping is sending trickle candidates not one-by-one.
Returns XMPP address of this session's initiator.
Returns XMPP address of this session's responder.
Accepts incoming Jingle 'session-initiate' and should send 'session-accept' in result.
element pointing to the jingle element of the offer IQ
callback called when we accept incoming session successfully and receive RESULT packet to 'session-accept' sent.
function(error) called if for any reason we fail to accept the incoming offer. 'error' argument can be used to log some details about the error.
Optional
localTracks: JitsiLocalTrack[] = []the optional list of the local tracks that will be added, before the offer/answer cycle executes. We allow the localTracks to optionally be passed in so that the addition of the local tracks and the processing of the initial offer can all be done atomically. We want to make sure that any other operations which originate in the XMPP Jingle messages related with this session to be executed with an assumption that the initial offer/answer cycle has been executed already.
Adds new cancellable listener.
the name of the event
the listener.
Alias for on method.
The event ID.
Handler for the event.
Adds new listener.
the name of the event
the listener.
Handles a Jingle source-add message for this Jingle session.
an array of Jingle "content" elements.
resolved when the operation is done or rejected with an error.
Handles an 'add-source' event.
an array of Jingle 'content' elements.
Adds a new track to the peerconnection. This method needs to be called only when a secondary JitsiLocalTrack is being added to the peerconnection for the first time.
Tracks to be added to the peer connection.
that resolves when the track is successfully added to the peerconnection, rejected otherwise.
Adds local track back to the peerconnection associated with this session.
the local track to be added back to the peerconnection.
a promise that will resolve once the local track is added back to this session and renegotiation succeeds (if its warranted). Will be rejected with a string that provides some error details in case something goes wrong.
Closes the underlying peerconnection and shuts down the modification queue.
Emits an event.
event name
Returns the ice connection state for the peer connection.
the ice connection state for the peer connection.
Returns the preference for max frame height for the remote video sources.
Returns current state of this JingleSession instance.
the current state of this session instance.
Prepares this object to initiate a session.
the chat room for the conference associated with this session
the RTC service instance
The signaling layer instance.
the options, see implementing class's #doInitialize description for more details.
Creates an offer and sends Jingle 'session-initiate' to the remote peer.
the local tracks that will be added, before the offer/answer cycle executes (for the local track addition to be an atomic operation together with the offer/answer).
that resolves when the offer is sent to the remote peer, rejected otherwise.
Returns the number of listeners for the specified event.
Optional
eventName: stringThe name of the event.
Enables/disables local video based on 'senders' attribute of the video conent in 'content-modify' IQ sent by the remote peer. Also, checks if the sourceMaxFrameHeight (as requested by the p2p peer) or the senders attribute of the video content has changed and modifies the local video resolution accordingly.
The content of the 'content-modify' IQ sent by the remote peer.
Removes event listener.
The event ID.
Optional
handler: EventListenerOptional, the specific handler to unbind.
Attaches a handler for events (e.g., "participant joined") in the conference. All possible events are defined in JitsiConferenceEvents.
The event ID.
Handler for the event.
Adds a one-time listener function for the event.
The event ID.
Handler for the event.
Handles the termination of the session.
The XMPP Jingle reason condition.
The XMPP Jingle reason text.
Processes the source map message received from the bridge and creates a new remote track for newly signaled SSRCs or updates the source-name and owner on the remote track for an existing SSRC.
The source map message.
The media type, 'audio' or 'video'.
Removes all listeners for the event emitter.
Alias for off method.
The event ID.
Optional
handler: EventListenerOptional, the specific handler to unbind.
Removes listener.
the name of the event that triggers the listener
the listener.
Handles a Jingle source-remove message for this Jingle session.
Handles the deletion of SSRCs associated with a remote user from the remote description when the user leaves.
Endpoint id of the participant that has left the call.
Handles a 'remove-source' event.
an array of Jingle 'content' elements.
Removes local track from the peerconnection as part of the mute operation.
the local track to be removed.
a promise which will be resolved once the local track is removed from this session or rejected with a string that the describes the error if anything goes wrong.
Replaces oldTrack with newTrack and performs a single offer/answer cycle (if needed) after both operations are done. oldTrack or newTrack can be null; replacing a valid oldTrack with a null newTrack effectively just removes oldTrack.
the current track in use to be replaced.
the new track to use.
which resolves once the replacement is complete with no arguments or rejects with an error.
Sets the answer received from the remote peer as the remote description.
The jingle answer element.
that resolves when the answer is set as the remote description, rejected otherwise.
Resumes or suspends media transfer over the underlying peer connection.
true to enable media transfer or false to suspend media transmission.
Resumes or suspends video media transfer over the p2p peer connection.
true to enable video media transfer or false to suspend video media transmission.
a Promise which will resolve once the operation is done. It will be rejected with an error description as a string in case anything goes wrong.
Adjust the preference for max video frame height that the local party is willing to receive. Signals the remote p2p peer.
The receiver constraints per source.
Sets the resolution constraint on the local video tracks.
The user preferred max frame height.
The source name of the track.
promise that will be resolved when the operation is successful and rejected otherwise.
Updates the codecs on the peerconnection and initiates a renegotiation (if needed) for the new codec config to take effect.
Preferred codecs for video.
The preferred screenshare codec.
Converts to string with minor summary.
Static
parseParses the source-name and max frame height value of the 'content-modify' IQ when source-name signaling is enabled.
An element pointing to the '>jingle' element.
Creates new JingleSessionPC