Search Results for

    / fm / liveswitch / WebRtcStream

    Class: WebRtcStream

    fm.liveswitch.WebRtcStream

    Hierarchy

    • WebRtcStreamBase

      ↳ WebRtcStream

      ↳↳ WebRtcMediaStreamBase

      ↳↳ WebRtcDataStreamBase

    Implements

    • IInternalStream

    Table of contents

    Constructors

    • constructor

    Properties

    • _mediaDescriptionManager
    • _transportInfo

    Methods

    • addOnDirectionChange
    • addOnStateChange
    • changeDirection
    • getConnectedTimestamp
    • getConnection
    • getConnectionId
    • getDirection
    • getDynamicProperties
    • getDynamicValue
    • getExternalId
    • getId
    • getIsTerminated
    • getIsTerminating
    • getIsTerminatingOrTerminated
    • getLabel
    • getLocalDirection
    • getLocalReceive
    • getLocalSend
    • getMediaDescriptionId
    • getRemoteDirection
    • getRemoteReceive
    • getRemoteSend
    • getState
    • getTag
    • getTransportInfo
    • getType
    • getTypeString
    • getUseWssForMedia
    • processStateChange
    • processStateLockChange
    • removeOnDirectionChange
    • removeOnStateChange
    • setConnection
    • setDynamicValue
    • setExternalId
    • setLocalDirection
    • setLocalReceive
    • setLocalSend
    • setTag
    • setTransportInfo
    • setUseWssForMedia
    • toString
    • unsetDynamicValue

    Constructors

    constructor

    + new WebRtcStream(type: StreamType): WebRtcStream

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

    Parameters:

    Name Type Description
    type StreamType The type.

    Returns: WebRtcStream

    Inherited from: WebRtcStreamBase

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

    Properties

    _mediaDescriptionManager

    • Private _mediaDescriptionManager: MediaDescriptionManager

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


    _transportInfo

    • Private _transportInfo: TransportInfo

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

    Methods

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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


    changeDirection

    ▸ AbstractchangeDirection(newDirection: StreamDirection): Error

    Changes this stream's direction.

    Parameters:

    Name Type
    newDirection StreamDirection

    Returns: Error

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


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

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


    getConnection

    ▸ getConnection(): WebRtcConnection

    Returns: WebRtcConnection

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


    getConnectionId

    ▸ getConnectionId(): string

    Gets the connection identifier.

    Returns: string

    Inherited from: WebRtcStreamBase

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


    getDirection

    ▸ AbstractgetDirection(): StreamDirection

    Gets the current direction.

    Returns: StreamDirection

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getDynamicProperties

    ▸ getDynamicProperties(): Hash<string, Object>

    Gets all dynamic properties on this instance.

    Returns: Hash<string, Object>

    Inherited from: WebRtcStreamBase

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

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


    getExternalId

    ▸ getExternalId(): string

    Gets the external identifier.

    Returns: string

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getId

    ▸ getId(): string

    Gets the identifier.

    Returns: string

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getIsTerminated

    ▸ getIsTerminated(): boolean

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

    Returns: boolean

    Inherited from: WebRtcStreamBase

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


    getIsTerminating

    ▸ getIsTerminating(): boolean

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

    Returns: boolean

    Inherited from: WebRtcStreamBase

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


    getIsTerminatingOrTerminated

    ▸ getIsTerminatingOrTerminated(): boolean

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

    Returns: boolean

    Inherited from: WebRtcStreamBase

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


    getLabel

    ▸ AbstractgetLabel(): string

    Gets a label that identifies this class.

    Returns: string

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getLocalDirection

    ▸ AbstractgetLocalDirection(): StreamDirection

    Gets current direction indicated by the local description.

    Returns: StreamDirection

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


    getRemoteDirection

    ▸ AbstractgetRemoteDirection(): StreamDirection

    Gets current direction indicated by the remote description.

    Returns: StreamDirection

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


    getState

    ▸ getState(): StreamState

    Gets the state of the stream.

    Returns: StreamState

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getTag

    ▸ getTag(): string

    Gets optional data to associate with this instance.

    Returns: string

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getTransportInfo

    ▸ getTransportInfo(): TransportInfo

    Returns: TransportInfo

    Implementation of: IInternalStream

    Overrides: WebRtcStreamBase

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


    getType

    ▸ getType(): StreamType

    Gets the type.

    Returns: StreamType

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: WebRtcStreamBase

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


    getUseWssForMedia

    ▸ getUseWssForMedia(): boolean

    Gets a value indicating whether W

    Returns: boolean

    Inherited from: WebRtcStreamBase

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


    processStateChange

    ▸ ProtectedprocessStateChange(): void

    Processes a state change.

    Returns: void

    Inherited from: WebRtcStreamBase

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


    processStateLockChange

    ▸ ProtectedprocessStateLockChange(): void

    Processes a state lock change.

    Returns: void

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


    setConnection

    ▸ setConnection(remoteTrack: WebRtcConnection): void

    Parameters:

    Name Type
    remoteTrack WebRtcConnection

    Returns: void

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

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

    Inherited from: WebRtcStreamBase

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


    setLocalDirection

    ▸ AbstractsetLocalDirection(value: StreamDirection): void

    Sets current direction indicated by the local description.

    Parameters:

    Name Type
    value StreamDirection

    Returns: void

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


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

    Inherited from: WebRtcStreamBase

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


    setTag

    ▸ setTag(value: string): void

    Sets optional data to associate with this instance.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IInternalStream

    Inherited from: WebRtcStreamBase

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


    setTransportInfo

    ▸ setTransportInfo(transportInfo: TransportInfo): void

    Parameters:

    Name Type
    transportInfo TransportInfo

    Returns: void

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


    setUseWssForMedia

    ▸ setUseWssForMedia(value: boolean): void

    Sets a value indicating whether W

    Parameters:

    Name Type
    value boolean

    Returns: void

    Inherited from: WebRtcStreamBase

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


    toString

    ▸ toString(): string

    Returns a string that represents this instance.

    Returns: string

    Inherited from: WebRtcStreamBase

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


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

    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.19.0