Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 5.59 KB

sip.js.sessiondescriptionhandler.md

File metadata and controls

63 lines (49 loc) · 5.59 KB

Home > sip.js > SessionDescriptionHandler

SessionDescriptionHandler class

A base class implementing a WebRTC session description handler for sip.js.

Signature:

export declare class SessionDescriptionHandler implements SessionDescriptionHandlerDefinition 

Remarks

It is expected/intended to be extended by specific WebRTC based applications.

Constructors

Constructor Modifiers Description
(constructor)(logger, mediaStreamFactory, sessionDescriptionHandlerConfiguration) Constructor

Properties

Property Modifiers Type Description
_dataChannel RTCDataChannel | undefined The data channel. Undefined before created.
_localMediaStream MediaStream The local media stream.
_peerConnection RTCPeerConnection | undefined The peer connection. Undefined after SessionDescriptionHandler.close().
_peerConnectionDelegate PeerConnectionDelegate | undefined The peer connection delegate.
_remoteMediaStream MediaStream The remote media stream.
dataChannel RTCDataChannel | undefined The data channel. Undefined before it is created.
localMediaStream MediaStream The local media stream currently being sent.
logger Logger Logger.
mediaStreamFactory MediaStreamFactory Media stream factory.
peerConnection RTCPeerConnection | undefined The peer connection. Undefined if peer connection has closed.
peerConnectionDelegate PeerConnectionDelegate | undefined A delegate which provides access to the peer connection event handlers.
remoteMediaStream MediaStream The remote media stream currently being received.
sessionDescriptionHandlerConfiguration SessionDescriptionHandlerConfiguration Configuration options.

Methods

Method Modifiers Description
applyModifiers(sdp, modifiers) Applies modifiers to SDP prior to setting the local or remote description.
close() Stop tracks and close peer connection.
createDataChannel(options) Create a data channel.
createLocalOfferOrAnswer(options) Depending on current signaling state, create a local offer or answer.
getDescription(options, modifiers) Creates an offer or answer.
getLocalMediaStream(options) Get a media stream from the media stream factory and set the local media stream.
getLocalSessionDescription() Gets the peer connection's local session description.
hasDescription(contentType) Returns true if the SessionDescriptionHandler can handle the Content-Type described by a SIP message.
iceGatheringComplete() Called when ICE gathering completes and resolves any waiting promise.
sendDtmf(tones, options) Send DTMF via RTP (RFC 4733). Returns true if DTMF send is successful, false otherwise.
setDescription(sdp, options, modifiers) Sets an offer or answer.
setLocalMediaStream(stream) Sets the peer connection's sender tracks and local media stream tracks.
setLocalSessionDescription(sessionDescription) Sets the peer connection's local session description.
setRemoteSessionDescription(sessionDescription) Sets the peer connection's remote session description.
setRemoteTrack(track) Sets a remote media stream track.
waitForIceGatheringComplete(restart, timeout) Wait for ICE gathering to complete.