fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack > Class Template Referenceabstract

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

Public Member Functions

abstract void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the audio track is destroyed. More...
 
abstract void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the video track is destroyed. More...
 
abstract void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void addOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size changes. More...
 
abstract void destroy ()
 Destroys this media stack. More...
 
double getAudioGain ()
 Gets the gain (input amplification) of the audio track. More...
 
abstract int getAudioLevelInterval ()
 Gets the interval in milliseconds between fm.liveswitch.MediaBase#addOnAudioLevel events. More...
 
boolean getAudioMuted ()
 Gets a value indicating whether the audio is muted. More...
 
TIAudioTrack getAudioTrack ()
 Gets the audio track from this media. More...
 
abstract TIAudioTrack[] getAudioTracks ()
 Gets all audio tracks from this media. More...
 
double getAudioVolume ()
 Gets the audio volume on the audio track. More...
 
String getId ()
 Gets the unique identifier of this media. More...
 
boolean getVideoMuted ()
 Gets a value indicating whether the video track is muted. More...
 
abstract fm.liveswitch.Size getVideoSize ()
 Gets the size of the last processed video frame, if known. More...
 
TIVideoTrack getVideoTrack ()
 Gets the video track from this media. More...
 
abstract TIVideoTrack[] getVideoTracks ()
 Gets all video tracks from this media. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Gets the next raw video frame. More...
 
 MediaBase ()
 Initializes a new instance of the fm.liveswitch.MediaBase class. More...
 
abstract void removeOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the audio track is destroyed. More...
 
abstract void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the video track is destroyed. More...
 
abstract void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void removeOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size changes. More...
 
void setAudioGain (double value)
 Sets the gain (input amplification) of the audio track. More...
 
abstract void setAudioLevelInterval (int value)
 Sets the interval in milliseconds between fm.liveswitch.MediaBase#addOnAudioLevel events. More...
 
void setAudioMuted (boolean value)
 Sets a value indicating whether the audio is muted. More...
 
void setAudioVolume (double value)
 Sets the audio volume on the audio track. More...
 
void setId (String value)
 Sets the unique identifier of this media. More...
 
void setVideoMuted (boolean value)
 Sets a value indicating whether the video track is muted. More...
 
- Public Member Functions inherited from fm.liveswitch.Dynamic
java.util.HashMap< String, Object > getDynamicProperties ()
 Gets all dynamic properties on this instance. More...
 
Object getDynamicValue (String key)
 Gets a property value from the local cache. More...
 
void setDynamicValue (String key, Object value)
 Sets a property value in the local cache. More...
 
boolean unsetDynamicValue (String key)
 Removes a property value from the local cache. More...
 
- Public Member Functions inherited from fm.liveswitch.IMedia< TIAudioTrack, TIVideoTrack >
abstract void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the audio track is destroyed. More...
 
abstract void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the video track is destroyed. More...
 
abstract void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void addOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the video's frame size changes. More...
 
abstract void destroy ()
 Destroys this media stack. More...
 
abstract double getAudioGain ()
 Gets a value indicating the audio gain (input amplification). More...
 
abstract int getAudioLevelInterval ()
 Gets the interval in milliseconds between fm.liveswitch.IMedia#addOnAudioLevel events. More...
 
abstract boolean getAudioMuted ()
 Gets a value indicating whether the audio is muted. More...
 
abstract TIAudioTrack getAudioTrack ()
 Gets the audio track. More...
 
abstract TIAudioTrack[] getAudioTracks ()
 Gets the audio tracks. More...
 
abstract double getAudioVolume ()
 Gets a value indicating the audio volume (output resistance). More...
 
abstract String getId ()
 Gets the identifier. More...
 
abstract boolean getVideoMuted ()
 Gets a value indicating whether the video is muted. More...
 
abstract fm.liveswitch.Size getVideoSize ()
 Gets the size of the last processed video frame, if known. More...
 
abstract TIVideoTrack getVideoTrack ()
 Gets the video track. More...
 
abstract TIVideoTrack[] getVideoTracks ()
 Gets the video tracks. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Gets the next raw video frame. More...
 
abstract void removeOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the audio track is destroyed. More...
 
abstract void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised periodically when the audio's level is calculated. More...
 
abstract void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the video track is destroyed. More...
 
abstract void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size is known, once per frame. More...
 
abstract void removeOnVideoSizeChange (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the video's frame size changes. More...
 
abstract void setAudioGain (double value)
 Sets a value indicating the audio gain (input amplification). More...
 
abstract void setAudioLevelInterval (int value)
 Sets the interval in milliseconds between fm.liveswitch.IMedia#addOnAudioLevel events. More...
 
abstract void setAudioMuted (boolean value)
 Sets a value indicating whether the audio is muted. More...
 
abstract void setAudioVolume (double value)
 Sets a value indicating the audio volume (output resistance). More...
 
abstract void setId (String value)
 Sets the identifier. More...
 
abstract void setVideoMuted (boolean value)
 Sets a value indicating whether the video is muted. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fm.liveswitch.Dynamic
 Dynamic ()
 
- Protected Member Functions inherited from fm.liveswitch.Serializable
boolean getIsDirty ()
 Gets a value indicating whether this instance is dirty. More...
 
 Serializable ()
 Initializes a new instance of the fm.liveswitch.Serializable class. More...
 
void setIsDirty (boolean value)
 Sets a value indicating whether this instance is dirty. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ MediaBase()

fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.MediaBase ( )

Initializes a new instance of the fm.liveswitch.MediaBase class.

Member Function Documentation

◆ addOnAudioDestroyed()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.addOnAudioDestroyed ( fm.liveswitch.IAction0  value)
abstract

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.

◆ addOnAudioLevel()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.addOnAudioLevel ( fm.liveswitch.IAction1< Double >  value)
abstract

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.

◆ addOnVideoDestroyed()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.addOnVideoDestroyed ( fm.liveswitch.IAction0  value)
abstract

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.

◆ addOnVideoSize()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.addOnVideoSize ( fm.liveswitch.IAction1< fm.liveswitch.Size value)
abstract

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.

◆ addOnVideoSizeChange()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.addOnVideoSizeChange ( fm.liveswitch.IAction1< fm.liveswitch.Size value)
abstract

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.

◆ destroy()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.destroy ( )
abstract

Destroys this media stack.

◆ getAudioGain()

double fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioGain ( )

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.

◆ getAudioLevelInterval()

abstract int fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioLevelInterval ( )
abstract

Gets the interval in milliseconds between fm.liveswitch.MediaBase#addOnAudioLevel events.

◆ getAudioMuted()

boolean fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioMuted ( )

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.

◆ getAudioTrack()

TIAudioTrack fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioTrack ( )

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.

◆ getAudioTracks()

abstract TIAudioTrack [] fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioTracks ( )
abstract

Gets all audio tracks from this media.

◆ getAudioVolume()

double fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getAudioVolume ( )

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.

◆ getId()

String fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getId ( )

Gets the unique identifier of this media.

◆ getVideoMuted()

boolean fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getVideoMuted ( )

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.

◆ getVideoSize()

abstract fm.liveswitch.Size fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getVideoSize ( )
abstract

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.

◆ getVideoTrack()

TIVideoTrack fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getVideoTrack ( )

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.

◆ getVideoTracks()

abstract TIVideoTrack [] fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.getVideoTracks ( )
abstract

Gets all video tracks from this media.

◆ grabVideoFrame()

abstract fm.liveswitch.Future<fm.liveswitch.VideoBuffer> fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.grabVideoFrame ( )
abstract

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
A future video buffer.

◆ removeOnAudioDestroyed()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.removeOnAudioDestroyed ( fm.liveswitch.IAction0  value)
abstract

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.

◆ removeOnAudioLevel()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.removeOnAudioLevel ( fm.liveswitch.IAction1< Double >  value)
abstract

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.

◆ removeOnVideoDestroyed()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.removeOnVideoDestroyed ( fm.liveswitch.IAction0  value)
abstract

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.

◆ removeOnVideoSize()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.removeOnVideoSize ( fm.liveswitch.IAction1< fm.liveswitch.Size value)
abstract

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.

◆ removeOnVideoSizeChange()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.removeOnVideoSizeChange ( fm.liveswitch.IAction1< fm.liveswitch.Size value)
abstract

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.

◆ setAudioGain()

void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setAudioGain ( double  value)

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.

◆ setAudioLevelInterval()

abstract void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setAudioLevelInterval ( int  value)
abstract

Sets the interval in milliseconds between fm.liveswitch.MediaBase#addOnAudioLevel events.

◆ setAudioMuted()

void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setAudioMuted ( boolean  value)

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.

◆ setAudioVolume()

void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setAudioVolume ( double  value)

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.

◆ setId()

void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setId ( String  value)

Sets the unique identifier of this media.

◆ setVideoMuted()

void fm.liveswitch.MediaBase< TIAudioTrack extends fm.liveswitch.IAudioTrack, TIVideoTrack extends fm.liveswitch.IVideoTrack >.setVideoMuted ( boolean  value)

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.