Search Results for

    / fm / liveswitch / RemoteMedia

    Class: RemoteMedia

    fm.liveswitch.RemoteMedia

    Hierarchy

    • Media

      ↳ RemoteMedia

    Implements

    • IRemoteMedia<AudioTrack, VideoTrack>
    • IExternalRemoteMedia

    Table of contents

    Constructors

    • constructor

    Methods

    • addOnAudioDestroyed
    • addOnAudioLevel
    • addOnVideoDestroyed
    • addOnVideoSize
    • addOnVideoSizeChange
    • changeAudioSinkOutput
    • changeVideoSinkOutput
    • destroy
    • getAudioGain
    • getAudioLevelInterval
    • getAudioMuted
    • getAudioSink
    • getAudioSinkOutput
    • getAudioSinkOutputs
    • getAudioTrack
    • getAudioTracks
    • getAudioVolume
    • getDynamicProperties
    • getDynamicValue
    • getId
    • getTypeString
    • getVideoMuted
    • getVideoSink
    • getVideoSinkOutput
    • getVideoSinkOutputs
    • getVideoSize
    • getVideoTrack
    • getVideoTracks
    • getView
    • getViewSink
    • grabVideoFrame
    • removeOnAudioDestroyed
    • removeOnAudioLevel
    • removeOnVideoDestroyed
    • removeOnVideoSize
    • removeOnVideoSizeChange
    • setAudioGain
    • setAudioLevelInterval
    • setAudioMuted
    • setAudioSinkOutput
    • setAudioVolume
    • setDynamicValue
    • setId
    • setVideoMuted
    • setVideoSinkOutput
    • unsetDynamicValue

    Constructors

    constructor

    + new RemoteMedia(audio?: boolean, video?: boolean): RemoteMedia

    Parameters:

    Name Type
    audio? boolean
    video? boolean

    Returns: RemoteMedia

    Inherited from: Media

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

    Methods

    addOnAudioDestroyed

    ▸ addOnAudioDestroyed(value: IAction0): void

    Registers a handler that triggers when the audio track is destroyed.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    addOnAudioLevel

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

    Registers a handler that gives audio level updates for the media. This method can be called before or after the media has started. When the media is in the Started state, the function runs every 100 milliseconds.
    Use this method to determine which audio streams are active.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:43


    addOnVideoDestroyed

    ▸ addOnVideoDestroyed(value: IAction0): void

    Registers a handler that triggers when the video track is destroyed.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:21


    addOnVideoSize

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

    Registers a handler that provides updates about the media’s video size.
    This event can be used to determine when the video size changes.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:51


    addOnVideoSizeChange

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

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:54


    changeAudioSinkOutput

    ▸ changeAudioSinkOutput(audioSinkOutput: SinkOutput): Future<Object>

    Parameters:

    Name Type
    audioSinkOutput SinkOutput

    Returns: Future<Object>

    Implementation of: IExternalRemoteMedia

    Defined in: Generated/TypeScript/fm.liveswitch/RemoteMedia.ts:34


    changeVideoSinkOutput

    ▸ changeVideoSinkOutput(videoSinkOutput: SinkOutput): Future<Object>

    Parameters:

    Name Type
    videoSinkOutput SinkOutput

    Returns: Future<Object>

    Implementation of: IExternalRemoteMedia

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


    destroy

    ▸ destroy(): void

    Destroys all non-persistent internal objects encapsulated by the Media class.
    This method iterates over all audio and video tracks and calls each track's Destroy method for non-persistent tracks.

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getAudioGain

    ▸ getAudioGain(): number

    Gets a value indicating the gain (input amplification) of this audio track.

    Returns: number

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getAudioLevelInterval

    ▸ getAudioLevelInterval(): number

    Gets the interval in milliseconds between audio level events.

    Returns: number

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:68


    getAudioMuted

    ▸ getAudioMuted(): boolean

    Checks whether the audio track is muted. Returns true if the audio track is muted and false otherwise. If there are multiple audio tracks in a custom media stack, this method calls into the first audio track.

    Returns: boolean

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:75


    getAudioSink

    ▸ getAudioSink(): DomAudioSink

    Gets the audio sink. An audio sink is where audio leaves the processing pipeline.
    An example of an audio sink is a playback device like a speaker.

    Returns: DomAudioSink

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getAudioSinkOutput

    ▸ getAudioSinkOutput(): SinkOutput

    Returns: SinkOutput

    Implementation of: IExternalRemoteMedia

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


    getAudioSinkOutputs

    ▸ getAudioSinkOutputs(): Future<SinkOutput[]>

    Returns: Future<SinkOutput[]>

    Implementation of: IExternalRemoteMedia

    Defined in: Generated/TypeScript/fm.liveswitch/RemoteMedia.ts:43


    getAudioTrack

    ▸ getAudioTrack(): AudioTrack

    Gets the audio track from this media. If there are multiple audio tracks in a custom media stack, this method calls into the first audio track. Returns null if there are no audio tracks.

    Returns: AudioTrack

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getAudioTracks

    ▸ getAudioTracks(): AudioTrack[]

    Gets all audio tracks from this media.

    Returns: AudioTrack[]

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:89


    getAudioVolume

    ▸ getAudioVolume(): number

    Gets a value that indicates the volume (output resistance) of the audio track.
    Valid values range between 0.0 and 1.0. A value of 1.0 indicates that there is no output resistance and audio is played at the input level. A value of 0.0 mutes the audio.
    If there are multiple audio tracks in a custom media stack, this method calls into the first audio track.

    Returns: number

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getDynamicProperties

    ▸ getDynamicProperties(): Hash<string, Object>

    Gets all dynamic properties on this instance.

    Returns: Hash<string, Object>

    Inherited from: Media

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

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


    getId

    ▸ getId(): string

    Gets the unique media identifier.

    Returns: string

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:105


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Overrides: Media

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


    getVideoMuted

    ▸ getVideoMuted(): boolean

    Checks whether the video track is muted. Returns true if the video track is muted and false otherwise.
    If the muted video track is part of a local media stack, then all outbound video frames are muted for any participants receiving them. If the muted video track is part of a remote media stack, then inbound video frames are muted and other participants are not affected.
    If there are multiple video tracks in a custom media stack, this method calls into the first video track.

    Returns: boolean

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    getVideoSink

    ▸ getVideoSink(): DomVideoSink

    Gets the video view sink if video is not disabled. ViewSink controls the view which displays the video.
    For example, in HTML the element is the view managed by the view sink. Call this method if you want to transform the view, like, for instance, adjusting its resolution or frame rates.

    Returns: DomVideoSink

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:237


    getVideoSinkOutput

    ▸ getVideoSinkOutput(): SinkOutput

    Returns: SinkOutput

    Implementation of: IExternalRemoteMedia

    Defined in: Generated/TypeScript/fm.liveswitch/RemoteMedia.ts:46


    getVideoSinkOutputs

    ▸ getVideoSinkOutputs(): Future<SinkOutput[]>

    Returns: Future<SinkOutput[]>

    Implementation of: IExternalRemoteMedia

    Defined in: Generated/TypeScript/fm.liveswitch/RemoteMedia.ts:49


    getVideoSize

    ▸ getVideoSize(): Size

    Gets the video track’s resolution.
    If there are multiple video tracks in a custom media stack, this method calls into the first video track.
    If you need to adjust a UI’s layout, use this method to check video dimensions. You can also use addOnVideoSize to ensure that the code is responsive.

    Returns: Size

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:123


    getVideoTrack

    ▸ getVideoTrack(): VideoTrack

    Gets the video track from this media.
    If there are multiple video tracks in a custom media stack, this method calls into the first video track. Returns null if there are no video tracks.

    Returns: VideoTrack

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:131


    getVideoTracks

    ▸ getVideoTracks(): VideoTrack[]

    Gets all video tracks from this media.

    Returns: VideoTrack[]

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:138


    getView

    ▸ getView(): HTMLElement

    Gets the view container from the media. On the web, the view is returned as a div element that contains an HTML5 video element. As an alternative to the layout manager, you can place this video element anywhere you want on the page.
    Call this method if you want access to the view preview or video element for display. You can assign this view to the LayoutManager for display as the Local Preview or the Remote View.
    Returns null if no view has been created.

    Returns: HTMLElement

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:250


    getViewSink

    ▸ getViewSink(): DomVideoSink

    Gets the video view sink if video is not disabled. ViewSink controls the view which displays the video.
    For example, in HTML the element is the view managed by the view sink. Call this method if you want to transform the view, like, for instance, adjusting its resolution or frame rates.

    Returns: DomVideoSink

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:258


    grabVideoFrame

    ▸ grabVideoFrame(): Future<VideoBuffer>

    Gets the next frame from the video track once it is rendered.
    If there are multiple video tracks in a custom media stack, this method calls into the first video track.
    This method could be used for asynchronous video processing or analysis.

    Returns: Future<VideoBuffer>

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:147


    removeOnAudioDestroyed

    ▸ removeOnAudioDestroyed(value: IAction0): void

    Removes a handler set to raise when the audio object is destroyed.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:28


    removeOnAudioLevel

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

    Removes a handler that gives audio level updates for the media.

    Parameters:

    Name Type
    value IAction1<number>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:154


    removeOnVideoDestroyed

    ▸ removeOnVideoDestroyed(value: IAction0): void

    Removes a handler set to raise when the video object is destroyed.

    Parameters:

    Name Type
    value IAction0

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    removeOnVideoSize

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

    Removes a registered function that provides updates about the media’s video size.

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:161


    removeOnVideoSizeChange

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

    Parameters:

    Name Type
    value IAction1<Size>

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


    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 method calls into the first audio track.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:171


    setAudioLevelInterval

    ▸ setAudioLevelInterval(value: number): void

    Sets the interval in milliseconds between audio level events.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:178


    setAudioMuted

    ▸ setAudioMuted(value: boolean): void

    Sets the audio track to mute. 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 method calls into the first audio track.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:186


    setAudioSinkOutput

    ▸ setAudioSinkOutput(value: SinkOutput): void

    Parameters:

    Name Type
    value SinkOutput

    Returns: void

    Implementation of: IExternalRemoteMedia

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


    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 and audio plays at the input level. A value of 0.0 mutes the audio.
    If there are multiple audio tracks in a custom media stack, this method calls into the first audio track.

    Parameters:

    Name Type
    value number

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

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


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

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


    setId

    ▸ setId(value: string): void

    Sets the unique media identifier.

    Parameters:

    Name Type
    value string

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:201


    setVideoMuted

    ▸ setVideoMuted(value: boolean): void

    Mutes or unmutes video for LocalMedia. For example, if you call setVideoMuted before joining a channel, your video is muted when you join.
    If there are multiple video tracks in a custom media stack, this method calls into the first video track.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Implementation of: IExternalRemoteMedia

    Inherited from: Media

    Defined in: Generated/TypeScript/fm.liveswitch/Media.ts:209


    setVideoSinkOutput

    ▸ setVideoSinkOutput(value: SinkOutput): void

    Parameters:

    Name Type
    value SinkOutput

    Returns: void

    Implementation of: IExternalRemoteMedia

    Defined in: Generated/TypeScript/fm.liveswitch/RemoteMedia.ts:55


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

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