Search Results for

    / fm / liveswitch / WebRtcMediaBase

    Class: WebRtcMediaBase<TIAudioTrack, TIVideoTrack>

    fm.liveswitch.WebRtcMediaBase

    A collection of audio/video track base methods/properties.

    Type parameters

    Name Type
    TIAudioTrack IAudioTrack
    TIVideoTrack IVideoTrack

    Hierarchy

    • Dynamic

      ↳ WebRtcMediaBase

      ↳↳ WebRtcMedia

    Implements

    • IMedia<TIAudioTrack, TIVideoTrack>

    Table of contents

    Constructors

    • constructor

    Methods

    • addOnAudioDestroyed
    • addOnAudioLevel
    • addOnVideoDestroyed
    • addOnVideoSize
    • addOnVideoSizeChange
    • destroy
    • getAudioGain
    • getAudioLevelInterval
    • getAudioMuted
    • getAudioTrack
    • getAudioTracks
    • getAudioVolume
    • getDynamicProperties
    • getDynamicValue
    • getId
    • getTypeString
    • getVideoMuted
    • getVideoSize
    • getVideoTrack
    • getVideoTracks
    • grabVideoFrame
    • removeOnAudioDestroyed
    • removeOnAudioLevel
    • removeOnVideoDestroyed
    • removeOnVideoSize
    • removeOnVideoSizeChange
    • setAudioGain
    • setAudioLevelInterval
    • setAudioMuted
    • setAudioVolume
    • setDynamicValue
    • setId
    • setVideoMuted
    • unsetDynamicValue

    Constructors

    constructor

    + new WebRtcMediaBase<TIAudioTrack, TIVideoTrack>(): WebRtcMediaBase<TIAudioTrack, TIVideoTrack>

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

    Type parameters:

    Name Type
    TIAudioTrack IAudioTrack
    TIVideoTrack IVideoTrack

    Returns: WebRtcMediaBase<TIAudioTrack, TIVideoTrack>

    Inherited from: Dynamic

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:14

    Methods

    addOnAudioDestroyed

    ▸ AbstractaddOnAudioDestroyed(value: IAction0): void

    Adds a handler that is raised when the audio track is destroyed. If there are multiple audio tracks in a custom media stack, this event is only triggered by the first audio track.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:40


    addOnAudioLevel

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

    Adds a handler that is raised periodically when the audio's level is calculated. If there are multiple audio tracks in a custom media stack, this event is only triggered by the first audio track.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:48


    addOnVideoDestroyed

    ▸ AbstractaddOnVideoDestroyed(value: IAction0): void

    Adds a handler that is raised when the video track is destroyed. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:56


    addOnVideoSize

    ▸ AbstractaddOnVideoSize(value: IAction1<Size>): void

    Adds a handler that is raised whenever the video's frame size is known, once per frame. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:64


    addOnVideoSizeChange

    ▸ AbstractaddOnVideoSizeChange(value: IAction1<Size>): void

    Adds a handler that is raised whenever the video's frame size changes. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:72


    destroy

    ▸ Abstractdestroy(): void

    Destroys this media stack.

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:78


    getAudioGain

    ▸ getAudioGain(): number

    Gets the gain (input amplification) of the audio track. Any value greater than or equal to 0.0 is valid. The default value is 1. If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Returns: number

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:86


    getAudioLevelInterval

    ▸ AbstractgetAudioLevelInterval(): number

    Gets the interval in milliseconds between [[fm.liveswitch.mediaBase]] events.

    Returns: number

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:102


    getAudioMuted

    ▸ getAudioMuted(): boolean

    Gets a value indicating whether the audio is muted. This method silences audio but does not disable the audio source or prevent its data from flowing through the processing pipeline. If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Returns: boolean

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:110


    getAudioTrack

    ▸ getAudioTrack(): TIAudioTrack

    Gets the audio track from this media. If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track. Returns null if there are no audio tracks.

    Returns: TIAudioTrack

    Implementation of: IMedia

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


    getAudioTracks

    ▸ AbstractgetAudioTracks(): TIAudioTrack[]

    Gets all audio tracks from this media.

    Returns: TIAudioTrack[]

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:137


    getAudioVolume

    ▸ getAudioVolume(): number

    Gets the audio volume on the audio track. Valid values range between 0.0 and 1.0. A value of 1.0 indicates that there is no output resistance on the audio and it is played back at the input level. A value of 0.0 mutes the audio.
    If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Returns: number

    Implementation of: IMedia

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


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


    getId

    ▸ getId(): string

    Gets the unique identifier of this media.

    Returns: string

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:160


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: Dynamic

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


    getVideoMuted

    ▸ getVideoMuted(): boolean

    Gets a value indicating whether the video track is muted.
    If the video track is muted, then remote users see a black frame instead of the local user’s video.
    If there are multiple video tracks in a custom media stack, this property is bound to the first video track.

    Returns: boolean

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:174


    getVideoSize

    ▸ AbstractgetVideoSize(): Size

    Gets the size of the last processed video frame, if known. If there are multiple video tracks in a custom media stack, this property is bound to the first video track.

    Returns: Size

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:189


    getVideoTrack

    ▸ getVideoTrack(): TIVideoTrack

    Gets the video track from this media.
    If there are multiple video tracks in a custom media stack, this property is bound to the first video track. Returns null if there are no video tracks.

    Returns: TIVideoTrack

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:196


    getVideoTracks

    ▸ AbstractgetVideoTracks(): TIVideoTrack[]

    Gets all video tracks from this media.

    Returns: TIVideoTrack[]

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:208


    grabVideoFrame

    ▸ AbstractgrabVideoFrame(): Future<VideoBuffer>

    Gets the next raw video frame. If there are multiple video tracks in a custom media stack, this method calls into the first video track.

    Returns: Future<VideoBuffer>

    A future video buffer.

    Implementation of: IMedia

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


    removeOnAudioDestroyed

    ▸ AbstractremoveOnAudioDestroyed(value: IAction0): void

    Removes a handler that is raised when the audio track is destroyed. If there are multiple audio tracks in a custom media stack, this event is only triggered by the first audio track.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:225


    removeOnAudioLevel

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

    Removes a handler that is raised periodically when the audio's level is calculated. If there are multiple audio tracks in a custom media stack, this event is only triggered by the first audio track.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Implementation of: IMedia

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


    removeOnVideoDestroyed

    ▸ AbstractremoveOnVideoDestroyed(value: IAction0): void

    Removes a handler that is raised when the video track is destroyed. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IMedia

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


    removeOnVideoSize

    ▸ AbstractremoveOnVideoSize(value: IAction1<Size>): void

    Removes a handler that is raised whenever the video's frame size is known, once per frame. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IMedia

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


    removeOnVideoSizeChange

    ▸ AbstractremoveOnVideoSizeChange(value: IAction1<Size>): void

    Removes a handler that is raised whenever the video's frame size changes. If there are multiple video tracks in a custom media stack, this event is only triggered by the first video track.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:257


    setAudioGain

    ▸ setAudioGain(value: number): void

    Sets the gain (input amplification) of the audio track. Any value greater than or equal to 0.0 is valid. The default value is 1. If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IMedia

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


    setAudioLevelInterval

    ▸ AbstractsetAudioLevelInterval(value: number): void

    Sets the interval in milliseconds between [[fm.liveswitch.mediaBase]] events.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:280


    setAudioMuted

    ▸ setAudioMuted(value: boolean): void

    Sets a value indicating whether the audio is muted. This method silences audio but does not disable the audio source or prevent its data from flowing through the processing pipeline. If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IMedia

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


    setAudioVolume

    ▸ setAudioVolume(value: number): void

    Sets the audio volume on the audio track. Valid values range between 0.0 and 1.0. A value of 1.0 indicates that there is no output resistance on the audio and it is played back at the input level. A value of 0.0 mutes the audio.
    If there are multiple audio tracks in a custom media stack, this property is bound to the first audio track.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:304


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


    setId

    ▸ setId(value: string): void

    Sets the unique identifier of this media.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:319


    setVideoMuted

    ▸ setVideoMuted(value: boolean): void

    Sets a value indicating whether the video track is muted.
    If the video track is muted, then remote users see a black frame instead of the local user’s video.
    If there are multiple video tracks in a custom media stack, this property is bound to the first video track.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IMedia

    Defined in: Generated/TypeScript/fm.liveswitch/WebRtcMediaBase.ts:333


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

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