Search Results for

    / fm / liveswitch / WebRtcConnectionBase

    Class: WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel>

    fm.liveswitch.WebRtcConnectionBase

    Connection base properties/methods.

    Type parameters

    Name Type
    TConnection WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel>
    TStream WebRtcStreamBase
    TAudioStream IAudioStream
    TVideoStream IVideoStream
    TDataStream IDataStream<TDataChannel>
    TDataChannel IDataChannel<TDataChannel>

    Hierarchy

    • Dynamic

      ↳ WebRtcConnectionBase

      ↳↳ WebRtcConnection

    Implements

    • IConnection<TConnection, TStream, TAudioStream, TVideoStream, TDataStream>

    Table of contents

    Constructors

    • constructor

    Methods

    • addIceServer
    • addIceServers
    • addOnExternalIdChange
    • addOnGatheringStateChange
    • addOnIceConnectionStateChange
    • addOnLocalCandidate
    • addOnLocalDescription
    • addOnRemoteCandidate
    • addOnRemoteDescription
    • addOnRoundTripTime
    • addOnSignallingStateChange
    • addOnStateChange
    • addRemoteCandidate
    • close
    • createAnswer
    • createOffer
    • doAddRemoteCandidate
    • doCreateAnswer
    • doCreateOffer
    • doProcessDescription
    • doSendCachedLocalCandidates
    • doSetLocalDescription
    • doSetRemoteDescription
    • fmliveswitchWebRtcConnectionBaseInit
    • getAudioStream
    • getAudioStreams
    • getBundlePolicy
    • getCanonicalName
    • getClosed
    • getConnected
    • getDataStream
    • getDataStreams
    • getDeadStreamTimeout
    • getDynamicProperties
    • getDynamicValue
    • getError
    • getExternalId
    • getFailed
    • getGatheringState
    • getHasAudio
    • getHasData
    • getHasVideo
    • getIceConnectionState
    • getIceGatherPolicy
    • getIceServer
    • getIceServers
    • getId
    • getInstance
    • getIsTerminated
    • getIsTerminating
    • getIsTerminatingOrTerminated
    • getLegacyTimeout
    • getLocalDescription
    • getMediaProtocol
    • getRemoteDescription
    • getSignallingState
    • getState
    • getStats
    • getStream
    • getStreams
    • getTieBreaker
    • getTimeout
    • getTrickleIcePolicy
    • getTypeString
    • getVideoEnabledUpdateConnectionPolicy
    • getVideoRetentionPolicy
    • getVideoStream
    • getVideoStreams
    • processDescription
    • processStateChange
    • raiseGatheringStateChange
    • raiseIceConnectionStateChange
    • raiseLocalCandidate
    • raiseRoundTripTime
    • removeIceServer
    • removeIceServers
    • removeOnExternalIdChange
    • removeOnGatheringStateChange
    • removeOnIceConnectionStateChange
    • removeOnLocalCandidate
    • removeOnLocalDescription
    • removeOnRemoteCandidate
    • removeOnRemoteDescription
    • removeOnRoundTripTime
    • removeOnSignallingStateChange
    • removeOnStateChange
    • setBundlePolicy
    • setDeadStreamTimeout
    • setDynamicValue
    • setError
    • setExternalId
    • setGatheringState
    • setIceConnectionState
    • setIceGatherPolicy
    • setIceServer
    • setIceServers
    • setLegacyTimeout
    • setLocalDescription
    • setMediaProtocol
    • setRemoteDescription
    • setSignallingState
    • setTieBreaker
    • setTimeout
    • setTrickleIcePolicy
    • setVideoEnabledUpdateConnectionPolicy
    • setVideoRetentionPolicy
    • unsetDynamicValue

    Constructors

    constructor

    + new WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel>(sharedLock: Object, connectionId: string): WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel>

    Initializes a new instance of the [[fm.liveswitch.connectionBase]] class.

    Type parameters:

    Name Type
    TConnection WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel, TConnection>
    TStream WebRtcStreamBase<TStream>
    TAudioStream IAudioStream
    TVideoStream IVideoStream
    TDataStream IDataStream<TDataChannel, TDataStream>
    TDataChannel IDataChannel<TDataChannel, TDataChannel>

    Parameters:

    Name Type
    sharedLock Object
    connectionId string

    Returns: WebRtcConnectionBase<TConnection, TStream, TAudioStream, TVideoStream, TDataStream, TDataChannel>

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:130

    Methods

    addIceServer

    ▸ addIceServer(iceServer: IceServer): void

    Adds an ICE server.

    Parameters:

    Name Type Description
    iceServer IceServer The ICE server.

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:180


    addIceServers

    ▸ addIceServers(iceServers: IceServer[]): void

    Adds some ICE servers.

    Parameters:

    Name Type Description
    iceServers IceServer[] The ICE servers.

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:193


    addOnExternalIdChange

    ▸ addOnExternalIdChange(value: IAction2<string, string>): void

    Adds a handler that is raised when external Id of this connection changes. Old external Id as well as internal Id are raised.

    Parameters:

    Name Type
    value IAction2<string, string>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:205


    addOnGatheringStateChange

    ▸ addOnGatheringStateChange(value: IAction1<TConnection>): void

    Adds a handler that is raised when the gathering state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:217


    addOnIceConnectionStateChange

    ▸ addOnIceConnectionStateChange(value: IAction1<TConnection>): void

    Adds a handler that is raised when the ice connection state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:229


    addOnLocalCandidate

    ▸ addOnLocalCandidate(value: IAction2<TConnection, Candidate>): void

    Adds a handler that is raised when a local candidate is added.

    Parameters:

    Name Type
    value IAction2<TConnection, Candidate>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:241


    addOnLocalDescription

    ▸ addOnLocalDescription(value: IAction2<TConnection, SessionDescription>): void

    Adds a handler that is raised when a local description is set.

    Parameters:

    Name Type
    value IAction2<TConnection, SessionDescription>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:253


    addOnRemoteCandidate

    ▸ addOnRemoteCandidate(value: IAction2<TConnection, Candidate>): void

    Adds a handler that is raised when a remote description is added.

    Parameters:

    Name Type
    value IAction2<TConnection, Candidate>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:265


    addOnRemoteDescription

    ▸ addOnRemoteDescription(value: IAction2<TConnection, SessionDescription>): void

    Adds a handler that is raised when a remote description is set.

    Parameters:

    Name Type
    value IAction2<TConnection, SessionDescription>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:277


    addOnRoundTripTime

    ▸ addOnRoundTripTime(value: IAction1<number>): void

    Adds a handler that is raised when a new round trip time is calculated.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:289


    addOnSignallingStateChange

    ▸ addOnSignallingStateChange(value: IAction1<TConnection>): void

    Adds a handler that is raised when the signalling state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:301


    addOnStateChange

    ▸ addOnStateChange(value: IAction1<TConnection>): void

    Adds a handler that is raised when the connection state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:313


    addRemoteCandidate

    ▸ addRemoteCandidate(remoteCandidate: Candidate): Future<Candidate>

    Adds the remote candidate.

    Parameters:

    Name Type Description
    remoteCandidate Candidate The remote candidate.

    Returns: Future<Candidate>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:326


    close

    ▸ Abstractclose(): boolean

    Closes this instance.

    Returns: boolean

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:368


    createAnswer

    ▸ createAnswer(): Future<SessionDescription>

    Creates an answer.

    Returns: Future<SessionDescription>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:389


    createOffer

    ▸ createOffer(): Future<SessionDescription>

    Creates an offer.

    Returns: Future<SessionDescription>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:444


    doAddRemoteCandidate

    ▸ Protected AbstractdoAddRemoteCandidate(promise: Promise<Candidate>, remoteCandidate: Candidate): void

    Adds the remote candidate.

    Parameters:

    Name Type Description
    promise Promise<Candidate> The promise.
    remoteCandidate Candidate The remote candidate.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:487


    doCreateAnswer

    ▸ Protected AbstractdoCreateAnswer(promise: Promise<SessionDescription>): void

    Creates an answer.

    Parameters:

    Name Type
    promise Promise<SessionDescription>

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:493


    doCreateOffer

    ▸ Protected AbstractdoCreateOffer(promise: Promise<SessionDescription>): boolean

    Creates an offer.

    Parameters:

    Name Type
    promise Promise<SessionDescription>

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:499


    doProcessDescription

    ▸ ProtecteddoProcessDescription(description: SessionDescription, isLocalDescription: boolean): Error

    Processes a session description.

    Parameters:

    Name Type Description
    description SessionDescription The session description.
    isLocalDescription boolean Whether this is a local session description.

    Returns: Error

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:507


    doSendCachedLocalCandidates

    ▸ Protected AbstractdoSendCachedLocalCandidates(): void

    Dispatches cached local candidates that were gathered while Connection generated session description.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:531


    doSetLocalDescription

    ▸ Protected AbstractdoSetLocalDescription(promise: Promise<SessionDescription>, localDescription: SessionDescription): void

    Sets the local description.

    Parameters:

    Name Type Description
    promise Promise<SessionDescription> The promise.
    localDescription SessionDescription The local description.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:539


    doSetRemoteDescription

    ▸ Protected AbstractdoSetRemoteDescription(promise: Promise<SessionDescription>, remoteDescription: SessionDescription): void

    Sets the remote description.

    Parameters:

    Name Type Description
    promise Promise<SessionDescription> The promise.
    remoteDescription SessionDescription The remote description.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:557


    fmliveswitchWebRtcConnectionBaseInit

    ▸ PrivatefmliveswitchWebRtcConnectionBaseInit(): void

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:104


    getAudioStream

    ▸ getAudioStream(): TAudioStream

    Gets the first audio stream.

    Returns: TAudioStream

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:595


    getAudioStreams

    ▸ AbstractgetAudioStreams(): TAudioStream[]

    Gets the audio streams.

    Returns: TAudioStream[]

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:611


    getBundlePolicy

    ▸ getBundlePolicy(): BundlePolicy

    Gets the bundle policy.

    Returns: BundlePolicy

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:617


    getCanonicalName

    ▸ getCanonicalName(): string

    Gets the canonical name.

    deprecated Use MediaStream.LocalCanonicalName instead.

    Returns: string

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:630


    getClosed

    ▸ getClosed(): Future<Object>

    Gets a future that resolves if the connection enters the Closed state or rejects if the connection enters the Failed state before that happens.

    Returns: Future<Object>

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:643


    getConnected

    ▸ getConnected(): Future<Object>

    Gets a future that resolves if the connection enters the Connected state or rejects if the connection enters the Failed state before that happens.

    Returns: Future<Object>

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:656


    getDataStream

    ▸ getDataStream(): TDataStream

    Gets the first data stream.

    Returns: TDataStream

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:685


    getDataStreams

    ▸ AbstractgetDataStreams(): TDataStream[]

    Gets the data streams.

    Returns: TDataStream[]

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:701


    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

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:710


    getDynamicProperties

    ▸ getDynamicProperties(): Hash<string, Object>

    Gets all dynamic properties on this instance.

    Returns: Hash<string, Object>

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:37


    getDynamicValue

    ▸ getDynamicValue(key: string): Object

    Gets a property value from the local cache.

    Parameters:

    Name Type Description
    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.

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:61


    getError

    ▸ getError(): Error

    Gets the error.

    Returns: Error

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:722


    getExternalId

    ▸ getExternalId(): string

    Gets the external identifier.

    Returns: string

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:734


    getFailed

    ▸ getFailed(): Future<Object>

    Gets a future that resolves if the connection enters the Failed state or rejects if the connection enters the Closed state before that happens.

    Returns: Future<Object>

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:747


    getGatheringState

    ▸ AbstractgetGatheringState(): IceGatheringState

    Gets the ICE gathering state.

    Returns: IceGatheringState

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:759


    getHasAudio

    ▸ getHasAudio(): boolean

    Gets whether this connection has an audio stream.

    Returns: boolean

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:765


    getHasData

    ▸ getHasData(): boolean

    Gets whether this connection has a data stream.

    Returns: boolean

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:777


    getHasVideo

    ▸ getHasVideo(): boolean

    Gets whether this connection has a video stream.

    Returns: boolean

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:789


    getIceConnectionState

    ▸ AbstractgetIceConnectionState(): IceConnectionState

    Gets the ICE connection state.

    Returns: IceConnectionState

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:801


    getIceGatherPolicy

    ▸ getIceGatherPolicy(): IceGatherPolicy

    Gets the ICE gather policy.

    Returns: IceGatherPolicy

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:807


    getIceServer

    ▸ getIceServer(): IceServer

    Gets the ICE server.

    Returns: IceServer

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:819


    getIceServers

    ▸ getIceServers(): IceServer[]

    Gets the ICE servers.

    Returns: IceServer[]

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:831


    getId

    ▸ getId(): string

    Gets the identifier.

    Returns: string

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:843


    getInstance

    ▸ Protected AbstractgetInstance(): TConnection

    Gets the current instance.

    Returns: TConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:855


    getIsTerminated

    ▸ getIsTerminated(): boolean

    Gets a value indicating whether the connection is currently closed or failed.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:861


    getIsTerminating

    ▸ getIsTerminating(): boolean

    Gets a value indicating whether the connection is currently closing or failing.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:873


    getIsTerminatingOrTerminated

    ▸ getIsTerminatingOrTerminated(): boolean

    Gets a value indicating whether the connection is currently closing, failing, closed, or failed.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:885


    getLegacyTimeout

    ▸ getLegacyTimeout(): boolean

    Gets a value indicating whether legacy Connection.Timeout should be used. When disabled, Connection.Timeout only accounts for the time spent trying to establish connectivity (i.e. time it takes to transition from the Connecting to the Connected state; from the time point when both offer and answer had been set to the connection being fully established). When enabled, Connection.Timeout accounts for the time spent from receiving an offer (or creating an offer) to establishing connectivity (i.e. time it takes to transition from Initializing to Connected state). By default, LegacyTimeout is set to true, so that existing behavior is preserved. However, in the future default will be updated to false. This means that IL will not account for any signalling delays that may occur while establishing connectivity. This option will be later deprecated.

    Returns: boolean

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:907


    getLocalDescription

    ▸ AbstractgetLocalDescription(): SessionDescription

    Gets the local description.

    Returns: SessionDescription

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:919


    getMediaProtocol

    ▸ getMediaProtocol(): MediaProtocol

    Gets the media protocol in use on this connection.

    Returns: MediaProtocol

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:938


    getRemoteDescription

    ▸ AbstractgetRemoteDescription(): SessionDescription

    Gets the remote description.

    Returns: SessionDescription

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:950


    getSignallingState

    ▸ getSignallingState(): SignallingState

    Gets the state of the signalling.

    Returns: SignallingState

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:958


    getState

    ▸ getState(): ConnectionState

    Gets the state of the connection.

    Returns: ConnectionState

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:970


    getStats

    ▸ AbstractgetStats(): Future<ConnectionStats>

    Gets the current connection stats.

    Returns: Future<ConnectionStats>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:982


    getStream

    ▸ getStream(): TStream

    Gets the first stream.

    Returns: TStream

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:988


    getStreams

    ▸ AbstractgetStreams(): TStream[]

    Gets the streams.

    Returns: TStream[]

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1004


    getTieBreaker

    ▸ getTieBreaker(): string

    Gets the tie breaker.

    Returns: string

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1010


    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

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1024


    getTrickleIcePolicy

    ▸ getTrickleIcePolicy(): TrickleIcePolicy

    Gets Trickle Ice Support Policy. Cf. https://tools.ietf.org/html/draft-ietf-ice-trickle-05

    Returns: TrickleIcePolicy

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1036


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:10


    getVideoEnabledUpdateConnectionPolicy

    ▸ getVideoEnabledUpdateConnectionPolicy(): IFunction1<number, number>

    Gets a method that determines when to enable video again on a connection that dynamically disables video. Optional. If not set, default policy will be used. Takes in an interger parameter that represents the amount of attempts already tried. Will return an interger value as a time period in seconds for how long to wait for the next attempt or -1 for no more attempts.

    Returns: IFunction1<number, number>

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1057


    getVideoRetentionPolicy

    ▸ getVideoRetentionPolicy(): VideoRetentionPolicy

    Gets the Video Retention Policy. This will determine how we will handle video on the connection when the connection is poor in quality.

    Returns: VideoRetentionPolicy

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1070


    getVideoStream

    ▸ getVideoStream(): TVideoStream

    Gets the first video stream.

    Returns: TVideoStream

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1082


    getVideoStreams

    ▸ AbstractgetVideoStreams(): TVideoStream[]

    Gets the video streams.

    Returns: TVideoStream[]

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1098


    processDescription

    ▸ ProtectedprocessDescription(description: SessionDescription, isLocalDescription: boolean): Error

    Processes a session description.

    Parameters:

    Name Type Description
    description SessionDescription The session description.
    isLocalDescription boolean Whether this is a local session description.

    Returns: Error

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1116


    processStateChange

    ▸ ProtectedprocessStateChange(): void

    Processes a state change.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1128


    raiseGatheringStateChange

    ▸ ProtectedraiseGatheringStateChange(connection: TConnection): void

    Raises gathering state change.

    Parameters:

    Name Type
    connection TConnection

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1193


    raiseIceConnectionStateChange

    ▸ ProtectedraiseIceConnectionStateChange(connection: TConnection): void

    Raises ICE connection state change.

    Parameters:

    Name Type
    connection TConnection

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1213


    raiseLocalCandidate

    ▸ ProtectedraiseLocalCandidate(localCandidate: Candidate): void

    Raises a local candidate but only if it has not been already raised.

    Parameters:

    Name Type Description
    localCandidate Candidate The local candidate.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1234


    raiseRoundTripTime

    ▸ ProtectedraiseRoundTripTime(roundTripTime: number): void

    Raises a round trip time.

    Parameters:

    Name Type
    roundTripTime number

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1317


    removeIceServer

    ▸ removeIceServer(iceServer: IceServer): void

    Removes an ICE server.

    Parameters:

    Name Type Description
    iceServer IceServer The ICE server.

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1422


    removeIceServers

    ▸ removeIceServers(iceServers: IceServer[]): void

    Removes some ICE servers.

    Parameters:

    Name Type Description
    iceServers IceServer[] The ICE servers.

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1435


    removeOnExternalIdChange

    ▸ removeOnExternalIdChange(value: IAction2<string, string>): void

    Removes a handler that is raised when external Id of this connection changes. Old external Id as well as internal Id are raised.

    Parameters:

    Name Type
    value IAction2<string, string>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1447


    removeOnGatheringStateChange

    ▸ removeOnGatheringStateChange(value: IAction1<TConnection>): void

    Removes a handler that is raised when the gathering state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1459


    removeOnIceConnectionStateChange

    ▸ removeOnIceConnectionStateChange(value: IAction1<TConnection>): void

    Removes a handler that is raised when the ice connection state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1471


    removeOnLocalCandidate

    ▸ removeOnLocalCandidate(value: IAction2<TConnection, Candidate>): void

    Removes a handler that is raised when a local candidate is added.

    Parameters:

    Name Type
    value IAction2<TConnection, Candidate>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1483


    removeOnLocalDescription

    ▸ removeOnLocalDescription(value: IAction2<TConnection, SessionDescription>): void

    Removes a handler that is raised when a local description is set.

    Parameters:

    Name Type
    value IAction2<TConnection, SessionDescription>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1495


    removeOnRemoteCandidate

    ▸ removeOnRemoteCandidate(value: IAction2<TConnection, Candidate>): void

    Removes a handler that is raised when a remote description is added.

    Parameters:

    Name Type
    value IAction2<TConnection, Candidate>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1507


    removeOnRemoteDescription

    ▸ removeOnRemoteDescription(value: IAction2<TConnection, SessionDescription>): void

    Removes a handler that is raised when a remote description is set.

    Parameters:

    Name Type
    value IAction2<TConnection, SessionDescription>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1519


    removeOnRoundTripTime

    ▸ removeOnRoundTripTime(value: IAction1<number>): void

    Removes a handler that is raised when a new round trip time is calculated.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1531


    removeOnSignallingStateChange

    ▸ removeOnSignallingStateChange(value: IAction1<TConnection>): void

    Removes a handler that is raised when the signalling state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1543


    removeOnStateChange

    ▸ removeOnStateChange(value: IAction1<TConnection>): void

    Removes a handler that is raised when the connection state changes.

    Parameters:

    Name Type
    value IAction1<TConnection>

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1555


    setBundlePolicy

    ▸ setBundlePolicy(value: BundlePolicy): void

    Sets the bundle policy.

    Parameters:

    Name Type
    value BundlePolicy

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1588


    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:

    Name Type
    value number

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1607


    setDynamicValue

    ▸ setDynamicValue(key: string, value: Object): void

    Sets a property value in the local cache.

    Parameters:

    Name Type Description
    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

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:98


    setError

    ▸ setError(value: Error): void

    Sets the error.

    Parameters:

    Name Type
    value Error

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1620


    setExternalId

    ▸ setExternalId(value: string): void

    Sets the external identifier.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1632


    setGatheringState

    ▸ Protected AbstractsetGatheringState(value: IceGatheringState): void

    Sets the ICE gathering state.

    Parameters:

    Name Type
    value IceGatheringState

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1661


    setIceConnectionState

    ▸ Protected AbstractsetIceConnectionState(value: IceConnectionState): void

    Sets the ICE connection state.

    Parameters:

    Name Type
    value IceConnectionState

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1667


    setIceGatherPolicy

    ▸ setIceGatherPolicy(value: IceGatherPolicy): void

    Sets the ICE gather policy.

    Parameters:

    Name Type
    value IceGatherPolicy

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1673


    setIceServer

    ▸ setIceServer(value: IceServer): void

    Sets the ICE server.

    Parameters:

    Name Type
    value IceServer

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1685


    setIceServers

    ▸ setIceServers(value: IceServer[]): void

    Sets the ICE servers.

    Parameters:

    Name Type
    value IceServer[]

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1697


    setLegacyTimeout

    ▸ setLegacyTimeout(value: boolean): void

    Sets a value indicating whether legacy Connection.Timeout should be used. When disabled, Connection.Timeout only accounts for the time spent trying to establish connectivity (i.e. time it takes to transition from the Connecting to the Connected state; from the time point when both offer and answer had been set to the connection being fully established). When enabled, Connection.Timeout accounts for the time spent from receiving an offer (or creating an offer) to establishing connectivity (i.e. time it takes to transition from Initializing to Connected state). By default, LegacyTimeout is set to true, so that existing behavior is preserved. However, in the future default will be updated to false. This means that IL will not account for any signalling delays that may occur while establishing connectivity. This option will be later deprecated.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1719


    setLocalDescription

    ▸ setLocalDescription(localDescription: SessionDescription): Future<SessionDescription>

    Sets the local description.

    Parameters:

    Name Type Description
    localDescription SessionDescription The local description.

    Returns: Future<SessionDescription>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1732


    setMediaProtocol

    ▸ setMediaProtocol(value: MediaProtocol): void

    Sets the media protocol in use on this connection.

    Parameters:

    Name Type
    value MediaProtocol

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1787


    setRemoteDescription

    ▸ setRemoteDescription(remoteDescription: SessionDescription): Future<SessionDescription>

    Sets the remote description.

    Parameters:

    Name Type Description
    remoteDescription SessionDescription The remote description.

    Returns: Future<SessionDescription>

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1800


    setSignallingState

    ▸ ProtectedsetSignallingState(value: SignallingState): void

    Sets the state of the signalling.

    Parameters:

    Name Type
    value SignallingState

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1859


    setTieBreaker

    ▸ setTieBreaker(value: string): void

    Sets the tie breaker.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1941


    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:

    Name Type
    value number

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1955


    setTrickleIcePolicy

    ▸ setTrickleIcePolicy(value: TrickleIcePolicy): void

    Sets Trickle Ice Support Policy. Cf. https://tools.ietf.org/html/draft-ietf-ice-trickle-05

    Parameters:

    Name Type
    value TrickleIcePolicy

    Returns: void

    Implementation of: IConnection

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:1968


    setVideoEnabledUpdateConnectionPolicy

    ▸ setVideoEnabledUpdateConnectionPolicy(value: IFunction1<number, number>): void

    Sets a method that determines when to enable video again on a connection that dynamically disables video. Optional. If not set, default policy will be used. Takes in an interger parameter that represents the amount of attempts already tried. Will return an interger value as a time period in seconds for how long to wait for the next attempt or -1 for no more attempts.

    Parameters:

    Name Type
    value IFunction1<number, number>

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:2000


    setVideoRetentionPolicy

    ▸ setVideoRetentionPolicy(value: VideoRetentionPolicy): void

    Sets the Video Retention Policy. This will determine how we will handle video on the connection when the connection is poor in quality.

    Parameters:

    Name Type
    value VideoRetentionPolicy

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcConnectionBase.ts:2013


    unsetDynamicValue

    ▸ unsetDynamicValue(key: string): boolean

    Removes a property value from the local cache. Returns true if the value was removed and returns false otherwise.

    Parameters:

    Name Type Description
    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.

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:125

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.23.1