/ fm / liveswitch / RemoteMedia
Class: RemoteMedia
fm.liveswitch.RemoteMedia
Hierarchy
-
↳ RemoteMedia
Implements
Table of contents
Constructors
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