Search Results for

    / fm / liveswitch / WebRtcDataStream

    Class: WebRtcDataStream

    fm.liveswitch.WebRtcDataStream

    Hierarchy

    • WebRtcDataStreamBase<WebRtcDataChannel>

      ↳ WebRtcDataStream

    Implements

    • IInternalDataStream

    Table of contents

    Constructors

    • constructor

    Methods

    • addChannel
    • addOnDirectionChange
    • addOnStateChange
    • attachToChannel
    • changeDirection
    • getAllChannels
    • getBytesReceived
    • getBytesSent
    • getCanonicalName
    • getChannels
    • getConnectedTimestamp
    • getConnection
    • getConnectionId
    • getDirection
    • getDynamicProperties
    • getDynamicValue
    • getExternalId
    • getId
    • getInfo
    • getIsTerminated
    • getIsTerminating
    • getIsTerminatingOrTerminated
    • getLabel
    • getLocalDirection
    • getLocalReceive
    • getLocalSend
    • getMediaDescriptionId
    • getMessagesReceived
    • getMessagesSent
    • getRemoteDirection
    • getRemoteReceive
    • getRemoteSend
    • getState
    • getTag
    • getTransportInfo
    • getType
    • getTypeString
    • processSdpMediaDescription
    • processStateChange
    • processStateLockChange
    • registerDataReceived
    • registerDataSent
    • removeOnDirectionChange
    • removeOnStateChange
    • setConnection
    • setDynamicValue
    • setExternalId
    • setLocalDirection
    • setLocalReceive
    • setLocalSend
    • setTag
    • setTransportInfo
    • toString
    • unsetDynamicValue

    Constructors

    constructor

    + new WebRtcDataStream(external: IExternalDataStream, channels: WebRtcDataChannel[]): WebRtcDataStream

    Parameters:

    Name Type
    external IExternalDataStream
    channels WebRtcDataChannel[]

    Returns: WebRtcDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:22

    Methods

    addChannel

    ▸ addChannel(channel: WebRtcDataChannel): void

    Parameters:

    Name Type
    channel WebRtcDataChannel

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:45


    addOnDirectionChange

    ▸ addOnDirectionChange(value: IAction0): void

    Adds a handler that is raised when the stream direction changes.
    Stream direction indicates the direction of media flow. For example:

    • A stream in an SFU upstream connection has a direction of SendOnly.
    • A stream in an SFU downstream connection has a direction of ReceiveOnly.
    • A stream in an MCU connection has a direction of SendReceive if it is attached to both local and remote media. If it is only attached to local media, it has a direction of SendOnly. If it is only attached to remote media, it has a direction of ReceiveOnly.
    The direction of a stream can change over its lifecycle. For example:
    • An update to an SFU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the direction of the stream changes to Inactive.
    • An update to an SFU downstream connection might cause it to stop receiving audio or video frames. In this case, the direction of the stream changes to Inactive.
    • An update to an MCU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the following occurs:

      • If the direction of the stream was SendOnly, then the direction changes to Inactive.
      • If the direction of the stream was ReceiveOnly, then the direction changes to SendReceive.
    • An update to an MCU upstream connection might instruct it to stop receiving audio or video frames. In this case, the following occurs:
      • If the direction of the stream was ReceiveOnly, then the direction changes to Inactive.
      • If the direction of the stream was SendReceive, then the direction changes to SendOnly.
    An event handler bound to the change in direction can be used to update the UI accordingly so the user is aware of the change in the state of the application.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:82


    addOnStateChange

    ▸ addOnStateChange(value: IAction0): void

    Adds a handler that is raised when the connection state changes.
    This method can track the state of the connection and can be used to display the current status of the connection to the user, add or remove media views in the UI, and handle retry logic if the connection fails.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:95


    attachToChannel

    ▸ ProtectedattachToChannel(channel: WebRtcDataChannel): void

    Attaches a data channel to this stream (events and IDs).

    Parameters:

    Name Type
    channel WebRtcDataChannel

    Returns: void

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:52


    changeDirection

    ▸ changeDirection(newDirection: StreamDirection): Error

    Changes this stream's direction

    Parameters:

    Name Type
    newDirection StreamDirection

    Returns: Error

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:70


    getAllChannels

    ▸ getAllChannels(): WebRtcDataChannel[]

    Returns: WebRtcDataChannel[]

    Implementation of: IInternalDataStream

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:41


    getBytesReceived

    ▸ getBytesReceived(): number

    Gets the number of bytes received.

    Returns: number

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:84


    getBytesSent

    ▸ getBytesSent(): number

    Gets the number of bytes sent.

    Returns: number

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:96


    getCanonicalName

    ▸ getCanonicalName(): string

    Gets the canonical name.

    deprecated Will be removed in a future release.

    Returns: string

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:109


    getChannels

    ▸ getChannels(): WebRtcDataChannel[]

    Returns: WebRtcDataChannel[]

    Implementation of: IInternalDataStream

    Overrides: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:31


    getConnectedTimestamp

    ▸ ProtectedgetConnectedTimestamp(): number

    Gets the ManagedStopwatch.GetTimestamp() value representing the ticks that passed when this stream's connection state changed to connected.

    Returns: number

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:114


    getConnection

    ▸ getConnection(): WebRtcConnection

    Returns: WebRtcConnection

    Inherited from: WebRtcDataStreamBase

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


    getConnectionId

    ▸ getConnectionId(): string

    Gets the connection identifier.

    Returns: string

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:126


    getDirection

    ▸ getDirection(): StreamDirection

    Gets the current direction.

    Returns: StreamDirection

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:127


    getDynamicProperties

    ▸ getDynamicProperties(): Hash<string, Object>

    Gets all dynamic properties on this instance.

    Returns: Hash<string, Object>

    Inherited from: WebRtcDataStreamBase

    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: WebRtcDataStreamBase

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


    getExternalId

    ▸ getExternalId(): string

    Gets the external identifier.

    Returns: string

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:146


    getId

    ▸ getId(): string

    Gets the identifier.

    Returns: string

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:158


    getInfo

    ▸ getInfo(): DataStreamInfo

    Gets the data stream info.

    Returns: DataStreamInfo

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:155


    getIsTerminated

    ▸ getIsTerminated(): boolean

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

    Returns: boolean

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:170


    getIsTerminating

    ▸ getIsTerminating(): boolean

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

    Returns: boolean

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:182


    getIsTerminatingOrTerminated

    ▸ getIsTerminatingOrTerminated(): boolean

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

    Returns: boolean

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:194


    getLabel

    ▸ getLabel(): string

    Gets a label that identifies this class.

    Returns: string

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:181


    getLocalDirection

    ▸ getLocalDirection(): StreamDirection

    Gets the current direction.

    Returns: StreamDirection

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

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


    getLocalReceive

    ▸ getLocalReceive(): boolean

    Gets a value indicating whether the local peer supports receiving media on this stream.
    Use this method to determine if a stream is used for sending media or only receiving media.

    Returns: boolean

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:219


    getLocalSend

    ▸ getLocalSend(): boolean

    Gets a value indicating whether the local peer on this stream supports sending media on this stream.
    Use this property to determine if a stream is used for sending media or only receiving media.

    Returns: boolean

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:233


    getMediaDescriptionId

    ▸ getMediaDescriptionId(): string

    Gets the media description ID of this stream.
    The media description ID is only available once a connection is opened with this stream, because it is obtained from the local SDP description of this stream.

    Returns: string

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:247


    getMessagesReceived

    ▸ getMessagesReceived(): number

    Gets the number of messages received.

    Returns: number

    Inherited from: WebRtcDataStreamBase

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


    getMessagesSent

    ▸ getMessagesSent(): number

    Gets the number of messages sent.

    Returns: number

    Inherited from: WebRtcDataStreamBase

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


    getRemoteDirection

    ▸ getRemoteDirection(): StreamDirection

    Gets the current direction.

    Returns: StreamDirection

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

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


    getRemoteReceive

    ▸ getRemoteReceive(): boolean

    Gets a value indicating whether receiving media is supported by the remote peer on this stream. Returns false if the remote stream direction has not been received.

    Returns: boolean

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:275


    getRemoteSend

    ▸ getRemoteSend(): boolean

    Gets a value indicating whether sending media is supported by the remote peer on this stream. Returns false if the remote stream direction has not been received.

    Returns: boolean

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:288


    getState

    ▸ getState(): StreamState

    Gets the state of the stream.

    Returns: StreamState

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

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


    getTag

    ▸ getTag(): string

    Gets optional data to associate with this instance.

    Returns: string

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:321


    getTransportInfo

    ▸ getTransportInfo(): TransportInfo

    Returns: TransportInfo

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStream.ts:41


    getType

    ▸ getType(): StreamType

    Gets the type.

    Returns: StreamType

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:339


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:4


    processSdpMediaDescription

    ▸ processSdpMediaDescription(sdpMessage: Message, sdpMediaDescription: MediaDescription, index: number, isLocalDescription: boolean, isOffer: boolean, isRenegotiation: boolean): Error

    Parameters:

    Name Type
    sdpMessage Message
    sdpMediaDescription MediaDescription
    index number
    isLocalDescription boolean
    isOffer boolean
    isRenegotiation boolean

    Returns: Error

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStream.ts:8


    processStateChange

    ▸ ProtectedprocessStateChange(): void

    Processes a state change.

    Returns: void

    Inherited from: WebRtcDataStreamBase

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


    processStateLockChange

    ▸ ProtectedprocessStateLockChange(): void

    Processes a state lock change.

    Returns: void

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:269


    registerDataReceived

    ▸ ProtectedregisterDataReceived(dataLength: number): void

    Registers that a data has been received.

    Parameters:

    Name Type Description
    dataLength number The data length.

    Returns: void

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:290


    registerDataSent

    ▸ ProtectedregisterDataSent(dataLength: number): void

    Registers that a data has been received.

    Parameters:

    Name Type Description
    dataLength number The data length.

    Returns: void

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:305


    removeOnDirectionChange

    ▸ removeOnDirectionChange(value: IAction0): void

    Removes a handler that is raised when the stream direction changes.
    Stream direction indicates the direction of media flow. For example:

    • A stream in an SFU upstream connection has a direction of SendOnly.
    • A stream in an SFU downstream connection has a direction of ReceiveOnly.
    • A stream in an MCU connection has a direction of SendReceive if it is attached to both local and remote media. If it is only attached to local media, it has a direction of SendOnly. If it is only attached to remote media, it has a direction of ReceiveOnly.
    The direction of a stream can change over its lifecycle. For example:
    • An update to an SFU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the direction of the stream changes to Inactive.
    • An update to an SFU downstream connection might cause it to stop receiving audio or video frames. In this case, the direction of the stream changes to Inactive.
    • An update to an MCU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the following occurs:

      • If the direction of the stream was SendOnly, then the direction changes to Inactive.
      • If the direction of the stream was ReceiveOnly, then the direction changes to SendReceive.
    • An update to an MCU upstream connection might instruct it to stop receiving audio or video frames. In this case, the following occurs:
      • If the direction of the stream was ReceiveOnly, then the direction changes to Inactive.
      • If the direction of the stream was SendReceive, then the direction changes to SendOnly.
    An event handler bound to the change in direction can be used to update the UI accordingly so the user is aware of the change in the state of the application.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:429


    removeOnStateChange

    ▸ removeOnStateChange(value: IAction0): void

    Removes a handler that is raised when the connection state changes.
    This method can track the state of the connection and can be used to display the current status of the connection to the user, add or remove media views in the UI, and handle retry logic if the connection fails.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:442


    setConnection

    ▸ setConnection(remoteTrack: WebRtcConnection): void

    Parameters:

    Name Type
    remoteTrack WebRtcConnection

    Returns: void

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStream.ts:13


    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: WebRtcDataStreamBase

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


    setExternalId

    ▸ setExternalId(value: string): void

    Sets the external identifier.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:471


    setLocalDirection

    ▸ setLocalDirection(value: StreamDirection): void

    Sets the current direction.

    Parameters:

    Name Type
    value StreamDirection

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcDataStreamBase.ts:340


    setLocalReceive

    ▸ setLocalReceive(value: boolean): void

    Sets a value indicating whether the local peer supports receiving media on this stream.
    Use this method to determine if a stream is used for sending media or only receiving media.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:490


    setLocalSend

    ▸ setLocalSend(value: boolean): void

    Sets a value indicating whether the local peer on this stream supports sending media on this stream.
    Use this property to determine if a stream is used for sending media or only receiving media.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:529


    setTag

    ▸ setTag(value: string): void

    Sets optional data to associate with this instance.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IInternalDataStream

    Inherited from: WebRtcDataStreamBase

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


    setTransportInfo

    ▸ setTransportInfo(transportInfo: TransportInfo): void

    Parameters:

    Name Type
    transportInfo TransportInfo

    Returns: void

    Inherited from: WebRtcDataStreamBase

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


    toString

    ▸ toString(): string

    Returns a string that represents this instance.

    Returns: string

    Inherited from: WebRtcDataStreamBase

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcStreamBase.ts:637


    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: WebRtcDataStreamBase

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

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