Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebRtcConnection

Hierarchy

  • WebRtcConnectionBase<WebRtcConnection, WebRtcStream, WebRtcAudioStream, WebRtcVideoStream, WebRtcDataStream, WebRtcDataChannel>
    • WebRtcConnection

Implements

  • IConnection<WebRtcConnection, WebRtcStream, WebRtcAudioStream, WebRtcVideoStream, WebRtcDataStream>
  • IInternalConnection

Index

Constructors

Properties

Methods

Constructors

constructor

  • new WebRtcConnection(external: IExternalConnection, streams: WebRtcStream[], remoteMedia: WebRtcRemoteMedia): WebRtcConnection
  • Parameters

    • external: IExternalConnection
    • streams: WebRtcStream[]
    • remoteMedia: WebRtcRemoteMedia

    Returns WebRtcConnection

Properties

Private _audioStreams

_audioStreams: WebRtcAudioStream[]
internal

Private _connectingTimer

_connectingTimer: number
internal

Private _dataStreams

_dataStreams: WebRtcDataStream[]
internal

Private _discoveredCandidates

_discoveredCandidates: Candidate[]
internal

Private _external

_external: IExternalConnection
internal

Private _gatheringState

_gatheringState: IceGatheringState
internal

Private _iceCandidateProcessingTimeout

_iceCandidateProcessingTimeout: number = 1000
internal

Private _iceConnectionState

_iceConnectionState: IceConnectionState
internal

Private _initialized

_initialized: boolean
internal

Private _isRenegotiation

_isRenegotiation: boolean
internal

Private _localDescription

_localDescription: SessionDescription
internal

Private _mediaStreams

_mediaStreams: WebRtcMediaStream<WebRtcMediaTrack>[]
internal

Private _nativeDtlsTransports

_nativeDtlsTransports: RTCDtlsTransport[]
internal

Private _nativeIceGatherers

_nativeIceGatherers: RTCIceGatherer[]
internal

Private _nativeIceTransports

_nativeIceTransports: RTCIceTransport[]
internal

Private _nativePeerConnection

_nativePeerConnection: RTCPeerConnection
internal

Private _nativeRtpReceivers

_nativeRtpReceivers: RTCRtpReceiver[]
internal

Private _nativeRtpSenders

_nativeRtpSenders: RTCRtpSender[]
internal

Private _offerer

_offerer: boolean
internal

Private _ortcLocalDescription

_ortcLocalDescription: OrtcSessionDescription
internal

Private _ortcRemoteDescription

_ortcRemoteDescription: OrtcSessionDescription
internal

Private _ortcSupportsTcp

_ortcSupportsTcp: boolean
internal

Private _remoteCandidatesDone

_remoteCandidatesDone: boolean
internal

Private _remoteCandidatesTimer

_remoteCandidatesTimer: number
internal

Private _remoteDescription

_remoteDescription: SessionDescription
internal

Private _remoteMedia

_remoteMedia: WebRtcRemoteMedia
internal

Private _remoteMediaTrackCount

_remoteMediaTrackCount: 0

Private _remoteNativeMediaStream

_remoteNativeMediaStream: any
internal

Private _rtpKinds

_rtpKinds: string[]
internal

Private _streams

_streams: WebRtcStream[]
internal

Private _transportsRemaining

_transportsRemaining: number
internal

Private _videoStreams

_videoStreams: WebRtcVideoStream[]
internal

Private dtmfSender

dtmfSender: RTCDtmfSender = null

Static Private __webRtcConnectionInitialized

__webRtcConnectionInitialized: boolean = false
internal

Methods

_getExternal

  • _getExternal(): IExternalConnection
  • internal

    Returns IExternalConnection

addIceServer

  • addIceServer(iceServer: IceServer): void
  • Adds an ICE server.

    Parameters

    • iceServer: IceServer

      The ICE server.

    Returns void

addIceServers

  • addIceServers(iceServers: IceServer[]): void
  • Adds some ICE servers.

    Parameters

    • iceServers: IceServer[]

      The ICE servers.

    Returns void

addOnGatheringStateChange

  • addOnGatheringStateChange(value: IAction1<WebRtcConnection>): void
  • Adds a handler that is raised when the gathering state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

addOnIceConnectionStateChange

  • addOnIceConnectionStateChange(value: IAction1<WebRtcConnection>): void
  • Adds a handler that is raised when the ice connection state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

addOnLocalCandidate

  • addOnLocalCandidate(value: IAction2<WebRtcConnection, Candidate>): void
  • Adds a handler that is raised when a local candidate is added.

    Parameters

    • value: IAction2<WebRtcConnection, Candidate>

    Returns void

addOnLocalDescription

  • addOnLocalDescription(value: IAction2<WebRtcConnection, SessionDescription>): void
  • Adds a handler that is raised when a local description is set.

    Parameters

    • value: IAction2<WebRtcConnection, SessionDescription>

    Returns void

addOnRemoteCandidate

  • addOnRemoteCandidate(value: IAction2<WebRtcConnection, Candidate>): void
  • Adds a handler that is raised when a remote description is added.

    Parameters

    • value: IAction2<WebRtcConnection, Candidate>

    Returns void

addOnRemoteDescription

  • addOnRemoteDescription(value: IAction2<WebRtcConnection, SessionDescription>): void
  • Adds a handler that is raised when a remote description is set.

    Parameters

    • value: IAction2<WebRtcConnection, SessionDescription>

    Returns void

addOnSignallingStateChange

  • addOnSignallingStateChange(value: IAction1<WebRtcConnection>): void
  • Adds a handler that is raised when the signalling state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

addOnStateChange

  • addOnStateChange(value: IAction1<WebRtcConnection>): void
  • Adds a handler that is raised when the connection state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

addRemoteCandidate

  • addRemoteCandidate(remoteCandidate: Candidate): Future<Candidate>
  • Adds the remote candidate.

    Parameters

    • remoteCandidate: Candidate

      The remote candidate.

    Returns Future<Candidate>

Private addStreamInternal

  • addStreamInternal(stream: WebRtcStream): void
  • Parameters

    • stream: WebRtcStream

    Returns void

Private addStreamsInternal

  • addStreamsInternal(streams: WebRtcStream[]): void
  • Parameters

    • streams: WebRtcStream[]

    Returns void

Private applyMediaFeedbackAttributes

  • applyMediaFeedbackAttributes(codecCap: RTCRtpCodecCapability, mediaFeedbackAttributeList: FeedbackAttribute[]): void
  • Parameters

    • codecCap: RTCRtpCodecCapability
    • mediaFeedbackAttributeList: FeedbackAttribute[]

    Returns void

Private applyMediaFormatParametersAttributes

  • applyMediaFormatParametersAttributes(codecCap: RTCRtpCodecCapability, mediaFormatParametersList: FormatParametersAttribute[]): void
  • Parameters

    • codecCap: RTCRtpCodecCapability
    • mediaFormatParametersList: FormatParametersAttribute[]

    Returns void

Protected assignRemoteDescriptionInternal

  • assignRemoteDescriptionInternal(sessionDescription: SessionDescription): void
  • Parameters

    • sessionDescription: SessionDescription

    Returns void

Private clearConnectingTimer

  • clearConnectingTimer(): void
  • Returns void

close

  • close(): void
  • Returns void

createAnswer

  • createAnswer(): Future<SessionDescription>
  • Creates an answer.

    Returns Future<SessionDescription>

Private createIceGatherer

  • createIceGatherer(rtcServers: RTCIceServer[]): RTCIceGatherer
  • Parameters

    • rtcServers: RTCIceServer[]

    Returns RTCIceGatherer

createOffer

  • createOffer(): Future<SessionDescription>
  • Creates an offer.

    Returns Future<SessionDescription>

Protected doAddRemoteCandidate

  • doAddRemoteCandidate(promise: Promise<Candidate>, remoteCandidate: Candidate): void
  • Parameters

    • promise: Promise<Candidate>
    • remoteCandidate: Candidate

    Returns void

Private doClose

  • doClose(): void
  • Returns void

Private doCreate

  • doCreate(promise: Promise<SessionDescription>): void
  • Parameters

    • promise: Promise<SessionDescription>

    Returns void

Protected doCreateAnswer

  • doCreateAnswer(promise: Promise<SessionDescription>): void
  • Parameters

    • promise: Promise<SessionDescription>

    Returns void

Protected doCreateOffer

  • doCreateOffer(promise: Promise<SessionDescription>): boolean
  • Parameters

    • promise: Promise<SessionDescription>

    Returns boolean

Protected doSendCachedLocalCandidates

  • doSendCachedLocalCandidates(): void
  • Returns void

Protected doSetLocalDescription

  • doSetLocalDescription(promise: Promise<SessionDescription>, localDescription: SessionDescription): void
  • Parameters

    • promise: Promise<SessionDescription>
    • localDescription: SessionDescription

    Returns void

Protected doSetRemoteDescription

  • doSetRemoteDescription(promise: Promise<SessionDescription>, remoteDescription: SessionDescription): void
  • Parameters

    • promise: Promise<SessionDescription>
    • remoteDescription: SessionDescription

    Returns void

getAudioStream

  • getAudioStream(): WebRtcAudioStream
  • Gets the first audio stream.

    Returns WebRtcAudioStream

getAudioStreams

  • getAudioStreams(): WebRtcAudioStream[]
  • Returns WebRtcAudioStream[]

Private getCandidatePairStats

  • getCandidatePairStats(candidatePairId: string, report: any): CandidatePairStats
  • Parameters

    • candidatePairId: string
    • report: any

    Returns CandidatePairStats

Private getCandidateStats

  • getCandidateStats(candidateId: string, report: any): CandidateStats
  • Parameters

    • candidateId: string
    • report: any

    Returns CandidateStats

Private getCertificateStats

  • getCertificateStats(certificateId: string, report: any): CertificateStats
  • Parameters

    • certificateId: string
    • report: any

    Returns CertificateStats

Private getCodecStats

  • getCodecStats(codecId: string, report: any, sender: boolean): CodecStats
  • Parameters

    • codecId: string
    • report: any
    • sender: boolean

    Returns CodecStats

getDataStream

  • getDataStream(): WebRtcDataStream
  • Gets the first data stream.

    Returns WebRtcDataStream

getDataStreams

  • getDataStreams(): WebRtcDataStream[]
  • Returns WebRtcDataStream[]

getDeadStreamTimeout

  • getDeadStreamTimeout(): number
  • Gets the amount of time (in milliseconds) to wait for connectivity checks to re-establish after they start to fail on a live connection. Defaults to 15,000.

    Returns number

getDtmfSender

  • getDtmfSender(): RTCDtmfSender
  • Returns RTCDtmfSender

getDynamicProperties

  • getDynamicProperties(): Hash<string, Object>
  • Gets the dynamic properties on this instance.

    Returns Hash<string, Object>

getDynamicValue

  • getDynamicValue(key: string): Object
  • Gets a property value from the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    Returns Object

    The stored value, if found; otherwise null.

getError

  • getError(): Error
  • Gets the error.

    Returns Error

getGatheringState

  • getGatheringState(): IceGatheringState
  • Returns IceGatheringState

getHasAudio

  • getHasAudio(): boolean
  • Gets whether this connection has an audio stream.

    Returns boolean

getHasData

  • getHasData(): boolean
  • Gets whether this connection has a data stream.

    Returns boolean

getHasVideo

  • getHasVideo(): boolean
  • Gets whether this connection has a video stream.

    Returns boolean

getIceCandidateProcessingTimeout

  • getIceCandidateProcessingTimeout(): number
  • Gets the amount of time (in milliseconds) to wait before halting gathering efforts for early candidates. Only applies when TrickleIceSupport is set to NotSupported. Defaults to 1000.

    Returns number

getIceConnectionState

  • getIceConnectionState(): IceConnectionState
  • Returns IceConnectionState

getIceGatherPolicy

  • getIceGatherPolicy(): IceGatherPolicy
  • Gets the ICE gather policy.

    Returns IceGatherPolicy

getIceServer

  • getIceServer(): IceServer
  • Gets the ICE server.

    Returns IceServer

getIceServers

  • getIceServers(): IceServer[]
  • Gets the ICE servers.

    Returns IceServer[]

getId

  • getId(): string
  • Gets the identifier.

    Returns string

getInstance

  • getInstance(): WebRtcConnection
  • Returns WebRtcConnection

getIsDirty

  • getIsDirty(): boolean
  • Gets a value indicating whether this instance is dirty.
    internal

    Returns boolean

getIsSerialized

  • getIsSerialized(): boolean

getLocalDescription

  • getLocalDescription(): SessionDescription
  • Returns SessionDescription

Private getMediaReceiverStats

  • getMediaReceiverStats(mediaReceiverId: string, report: any): MediaReceiverStats
  • Parameters

    • mediaReceiverId: string
    • report: any

    Returns MediaReceiverStats

Private getMediaSenderStats

  • getMediaSenderStats(mediaSenderId: string, report: any): MediaSenderStats
  • Parameters

    • mediaSenderId: string
    • report: any

    Returns MediaSenderStats

getMediaStreams

  • getMediaStreams(): WebRtcMediaStream<WebRtcMediaTrack>[]
  • Returns WebRtcMediaStream<WebRtcMediaTrack>[]

Private getMediaTrackStats

  • getMediaTrackStats(mediaTrackId: string, report: any): MediaTrackStats
  • Parameters

    • mediaTrackId: string
    • report: any

    Returns MediaTrackStats

getNativeDtlsTransports

  • getNativeDtlsTransports(): RTCDtlsTransport[]
  • Returns RTCDtlsTransport[]

getNativeIceGatherers

  • getNativeIceGatherers(): RTCIceGatherer[]
  • Returns RTCIceGatherer[]

getNativeIceTransports

  • getNativeIceTransports(): RTCIceTransport[]
  • Returns RTCIceTransport[]

getNativePeerConnection

  • getNativePeerConnection(): RTCPeerConnection
  • Returns RTCPeerConnection

getNativeRtpReceivers

  • getNativeRtpReceivers(): RTCRtpReceiver[]
  • Returns RTCRtpReceiver[]

getNativeRtpSenders

  • getNativeRtpSenders(): RTCRtpSender[]
  • Returns RTCRtpSender[]

getRemoteDescription

  • getRemoteDescription(): SessionDescription
  • Returns SessionDescription

getRemoteMedia

  • getRemoteMedia(): WebRtcRemoteMedia
  • Returns WebRtcRemoteMedia

getSerialized

  • getSerialized(): string

getSignallingState

  • getSignallingState(): SignallingState
  • Gets the state of the signalling.

    Returns SignallingState

getState

  • getState(): ConnectionState
  • Gets the state of the connection.

    Returns ConnectionState

getStats

  • getStats(): Future<ConnectionStats>
  • Returns Future<ConnectionStats>

getStream

  • getStream(): WebRtcStream
  • Gets the first stream.

    Returns WebRtcStream

getStreams

  • getStreams(): WebRtcStream[]
  • Returns WebRtcStream[]

getTieBreaker

  • getTieBreaker(): string
  • Gets the tie breaker.

    Returns string

getTimeout

  • getTimeout(): number
  • Gets the amount of time (in milliseconds) to wait for a connection to establish before giving up and closing it. Defaults to 30,000.

    Returns number

Private getTransportStats

  • getTransportStats(transportId: string, report: any, mediaSenderStats: MediaSenderStats, mediaReceiverStats: MediaReceiverStats): TransportStats
  • Parameters

    • transportId: string
    • report: any
    • mediaSenderStats: MediaSenderStats
    • mediaReceiverStats: MediaReceiverStats

    Returns TransportStats

getTrickleIcePolicy

  • getTrickleIcePolicy(): TrickleIcePolicy

getTypeString

  • getTypeString(): string
  • Returns string

getVideoStream

  • getVideoStream(): WebRtcVideoStream
  • Gets the first video stream.

    Returns WebRtcVideoStream

getVideoStreams

  • getVideoStreams(): WebRtcVideoStream[]
  • Returns WebRtcVideoStream[]

Private initialize

  • initialize(): void
  • Returns void

Private initializeTrack

  • initializeTrack(element: OrtcMediaElement, rtcServers: RTCIceServer[]): MediaStreamTrack
  • Parameters

    Returns MediaStreamTrack

Private ortcCandidateFromCandidate

  • ortcCandidateFromCandidate(candidate: Candidate): OrtcCandidate
  • Parameters

    • candidate: Candidate

    Returns OrtcCandidate

Private ortcCandidateToCandidate

  • ortcCandidateToCandidate(ortcCandidate: OrtcCandidate): Candidate
  • Parameters

    Returns Candidate

Private ortcSessionDescriptionFromSessionDescription

  • ortcSessionDescriptionFromSessionDescription(sessionDescription: SessionDescription): OrtcSessionDescription
  • Parameters

    • sessionDescription: SessionDescription

    Returns OrtcSessionDescription

Private ortcSessionDescriptionToSessionDescription

  • ortcSessionDescriptionToSessionDescription(ortcSessionDescription: OrtcSessionDescription): SessionDescription
  • Parameters

    Returns SessionDescription

Protected processDescription

  • processDescription(description: SessionDescription, isLocalDescription: boolean): Error
  • Processes a session description.

    Parameters

    • description: SessionDescription

      The session description.

    • isLocalDescription: boolean

      Whether this is a local session description.

    Returns Error

Private processRemoteDescriptionOnRenegotiation

  • processRemoteDescriptionOnRenegotiation(promise: Promise<SessionDescription>, remoteDescription: SessionDescription): void
  • Parameters

    • promise: Promise<SessionDescription>
    • remoteDescription: SessionDescription

    Returns void

Protected processSdpMediaDescription

  • processSdpMediaDescription(stream: WebRtcStream, sdpMediaDescription: MediaDescription, sdpMediaIndex: number, isLocalDescription: boolean, isRenegotiation: boolean): Error
  • Parameters

    • stream: WebRtcStream
    • sdpMediaDescription: MediaDescription
    • sdpMediaIndex: number
    • isLocalDescription: boolean
    • isRenegotiation: boolean

    Returns Error

processStateChange

  • processStateChange(): void
  • Returns void

Protected raiseGatheringStateChange

  • raiseGatheringStateChange(connection: WebRtcConnection): void
  • Raises gathering state change.

    Parameters

    • connection: WebRtcConnection

    Returns void

Protected raiseIceConnectionStateChange

  • raiseIceConnectionStateChange(connection: WebRtcConnection): void
  • Raises ICE connection state change.

    Parameters

    • connection: WebRtcConnection

    Returns void

Protected raiseLocalCandidate

  • raiseLocalCandidate(localCandidate: Candidate): void
  • Raises a local candidate but only if it has not been already raised.

    Parameters

    • localCandidate: Candidate

      The local candidate.

    Returns void

removeIceServer

  • removeIceServer(iceServer: IceServer): void
  • Removes an ICE server.

    Parameters

    • iceServer: IceServer

      The ICE server.

    Returns void

removeIceServers

  • removeIceServers(iceServers: IceServer[]): void
  • Removes some ICE servers.

    Parameters

    • iceServers: IceServer[]

      The ICE servers.

    Returns void

removeOnGatheringStateChange

  • removeOnGatheringStateChange(value: IAction1<WebRtcConnection>): void
  • Removes a handler that is raised when the gathering state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

removeOnIceConnectionStateChange

  • removeOnIceConnectionStateChange(value: IAction1<WebRtcConnection>): void
  • Removes a handler that is raised when the ice connection state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

removeOnLocalCandidate

  • removeOnLocalCandidate(value: IAction2<WebRtcConnection, Candidate>): void
  • Removes a handler that is raised when a local candidate is added.

    Parameters

    • value: IAction2<WebRtcConnection, Candidate>

    Returns void

removeOnLocalDescription

  • removeOnLocalDescription(value: IAction2<WebRtcConnection, SessionDescription>): void
  • Removes a handler that is raised when a local description is set.

    Parameters

    • value: IAction2<WebRtcConnection, SessionDescription>

    Returns void

removeOnRemoteCandidate

  • removeOnRemoteCandidate(value: IAction2<WebRtcConnection, Candidate>): void
  • Removes a handler that is raised when a remote description is added.

    Parameters

    • value: IAction2<WebRtcConnection, Candidate>

    Returns void

removeOnRemoteDescription

  • removeOnRemoteDescription(value: IAction2<WebRtcConnection, SessionDescription>): void
  • Removes a handler that is raised when a remote description is set.

    Parameters

    • value: IAction2<WebRtcConnection, SessionDescription>

    Returns void

removeOnSignallingStateChange

  • removeOnSignallingStateChange(value: IAction1<WebRtcConnection>): void
  • Removes a handler that is raised when the signalling state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

removeOnStateChange

  • removeOnStateChange(value: IAction1<WebRtcConnection>): void
  • Removes a handler that is raised when the connection state changes.

    Parameters

    • value: IAction1<WebRtcConnection>

    Returns void

Private removeSdesAttributesIfNeeded

  • removeSdesAttributesIfNeeded(remoteDescription: SessionDescription): void
  • Parameters

    • remoteDescription: SessionDescription

    Returns void

Private rtcCandidateFromSdpCandidateAttribute

  • rtcCandidateFromSdpCandidateAttribute(sdpCandidateAttribute: CandidateAttribute): RTCIceCandidateDictionary
  • Parameters

    • sdpCandidateAttribute: CandidateAttribute

    Returns RTCIceCandidateDictionary

Private rtcCandidateToSdpCandidateAttribute

  • rtcCandidateToSdpCandidateAttribute(rtcCandidate: RTCIceCandidateDictionary): CandidateAttribute
  • Parameters

    • rtcCandidate: RTCIceCandidateDictionary

    Returns CandidateAttribute

Private selectCodecs

  • selectCodecs(mediaIndex: number): RTCRtpCodecParameters[]
  • Parameters

    • mediaIndex: number

    Returns RTCRtpCodecParameters[]

Private selectEncodings

  • selectEncodings(mediaIndex: number, send: boolean): RTCRtpEncodingParameters[]
  • Parameters

    • mediaIndex: number
    • send: boolean

    Returns RTCRtpEncodingParameters[]

Private selectRtcp

  • selectRtcp(mediaIndex: number, send: boolean): RTCRtcpParameters
  • Parameters

    • mediaIndex: number
    • send: boolean

    Returns RTCRtcpParameters

Private sessionDescriptionTypeToEnum

  • sessionDescriptionTypeToEnum(typeString: string): SessionDescriptionType
  • Parameters

    • typeString: string

    Returns SessionDescriptionType

Private sessionDescriptionTypeToString

  • sessionDescriptionTypeToString(typeEnum: SessionDescriptionType): string
  • Parameters

    • typeEnum: SessionDescriptionType

    Returns string

Private setClosed

  • setClosed(): void
  • Returns void

Private setClosing

  • setClosing(): void
  • Returns void

Private setConnected

  • setConnected(): void
  • Returns void

Private setConnecting

  • setConnecting(): void
  • Returns void

setDeadStreamTimeout

  • setDeadStreamTimeout(value: number): void
  • Sets the amount of time (in milliseconds) to wait for connectivity checks to re-establish after they start to fail on a live connection. Defaults to 15,000.

    Parameters

    • value: number

    Returns void

setDynamicProperties

  • setDynamicProperties(value: Hash<string, Object>): void
  • internal

    Parameters

    • value: Hash<string, Object>

    Returns void

setDynamicValue

  • setDynamicValue(key: string, value: Object): void
  • Sets a property value in the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    • value: Object

      The property value. This can be any object that needs to be stored for future use.

    Returns void

Protected setError

  • setError(value: Error): void
  • Sets the error.

    Parameters

    • value: Error

    Returns void

Private setFailed

  • setFailed(): void
  • Returns void

Private setFailing

  • setFailing(error: Error): void
  • Parameters

    • error: Error

    Returns void

Protected setGatheringState

  • setGatheringState(state: IceGatheringState): void
  • Parameters

    • state: IceGatheringState

    Returns void

setIceCandidateProcessingTimeout

  • setIceCandidateProcessingTimeout(value: number): void
  • Sets the amount of time (in milliseconds) to wait before halting gathering efforts for early candidates. Only applies when TrickleIceSupport is set to NotSupported. Defaults to 1000.

    Parameters

    • value: number

    Returns void

Protected setIceConnectionState

  • setIceConnectionState(state: IceConnectionState): void
  • Parameters

    • state: IceConnectionState

    Returns void

setIceGatherPolicy

  • setIceGatherPolicy(value: IceGatherPolicy): void
  • Sets the ICE gather policy.

    Parameters

    • value: IceGatherPolicy

    Returns void

setIceServer

  • setIceServer(value: IceServer): void
  • Sets the ICE server.

    Parameters

    • value: IceServer

    Returns void

setIceServers

  • setIceServers(value: IceServer[]): void
  • Sets the ICE servers.

    Parameters

    • value: IceServer[]

    Returns void

setId

  • setId(value: string): void
  • Sets the identifier.

    Parameters

    • value: string

    Returns void

Private setInitializing

  • setInitializing(): void
  • Returns void

setIsDirty

  • setIsDirty(value: boolean): void
  • Sets a value indicating whether this instance is dirty.
    internal

    Parameters

    • value: boolean

    Returns void

setIsSerialized

  • setIsSerialized(value: boolean): void
  • internal

    Parameters

    • value: boolean

    Returns void

setLocalDescription

  • setLocalDescription(localDescription: SessionDescription): Future<SessionDescription>
  • Sets the local description.

    Parameters

    • localDescription: SessionDescription

      The local description.

    Returns Future<SessionDescription>

Private setNativeDescriptionSuccess

  • setNativeDescriptionSuccess(sessionDescription: SessionDescription, promise: Promise<SessionDescription>): void
  • Parameters

    • sessionDescription: SessionDescription
    • promise: Promise<SessionDescription>

    Returns void

setRemoteDescription

  • setRemoteDescription(remoteDescription: SessionDescription): Future<SessionDescription>
  • Sets the remote description.

    Parameters

    • remoteDescription: SessionDescription

      The remote description.

    Returns Future<SessionDescription>

setSerialized

  • setSerialized(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

Protected setSignallingState

  • setSignallingState(value: SignallingState): void
  • Sets the state of the signalling.

    Parameters

    • value: SignallingState

    Returns void

Protected setState

  • setState(value: ConnectionState): void
  • Sets the state of the connection.

    Parameters

    • value: ConnectionState

    Returns void

setTieBreaker

  • setTieBreaker(value: string): void
  • Sets the tie breaker.

    Parameters

    • value: string

    Returns void

setTimeout

  • setTimeout(value: number): void
  • Sets the amount of time (in milliseconds) to wait for a connection to establish before giving up and closing it. Defaults to 30,000.

    Parameters

    • value: number

    Returns void

setTrickleIcePolicy

  • setTrickleIcePolicy(value: TrickleIcePolicy): void

Private startOrtc

  • startOrtc(): void
  • Returns void

Private startOrtcTrack

  • startOrtcTrack(iceGatherer: RTCIceGatherer, iceTransport: RTCIceTransport, dtlsTransport: RTCDtlsTransport, localMediaDescription: OrtcMediaDescription, remoteMediaDescription: OrtcMediaDescription): void
  • Parameters

    Returns void

unsetDynamicValue

  • unsetDynamicValue(key: string): boolean
  • Unsets a property value in the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    Returns boolean

    true if the value was removed; otherwise, false.

Private updateLocalDescription

  • updateLocalDescription(localDescription: SessionDescription): SessionDescription
  • Parameters

    • localDescription: SessionDescription

    Returns SessionDescription

Private validateCandidate

  • validateCandidate(candidate: Candidate): boolean
  • Parameters

    • candidate: Candidate

    Returns boolean

Private webrtcCandidateFromCandidate

  • webrtcCandidateFromCandidate(candidate: Candidate): RTCIceCandidate
  • Parameters

    • candidate: Candidate

    Returns RTCIceCandidate

Private webrtcCandidateToCandidate

  • webrtcCandidateToCandidate(webrtcCandidate: RTCIceCandidate): Candidate
  • Parameters

    • webrtcCandidate: RTCIceCandidate

    Returns Candidate

Private webrtcSessionDescriptionFromSessionDescription

  • Parameters

    • sessionDescription: SessionDescription

    Returns WebRtcSessionDescription

Private webrtcSessionDescriptionToSessionDescription

  • Parameters

    Returns SessionDescription

Static webRtcConnectionInitialize

  • webRtcConnectionInitialize(): void
  • internal

    Returns void