fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack > Class Template Referenceabstract

A collection of audio/video tracks. More...

Public Member Functions

void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the first audio track is destroyed. More...
 
void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised whenever the level of the first audio track is calculated. More...
 
void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the first video track is destroyed. More...
 
void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the size of the first video track is calculated. More...
 
void destroy ()
 Destroys this media. More...
 
TAudioTrack[] getAudioTracks ()
 Gets the audio tracks. More...
 
boolean getIsRecordingAudio ()
 Gets a value indicating whether audio is being recorded. More...
 
boolean getIsRecordingVideo ()
 Gets a value indicating whether video is being recorded. More...
 
fm.liveswitch.Size getVideoSize ()
 Gets the size of the first video track. More...
 
TVideoTrack[] getVideoTracks ()
 Gets the video tracks. More...
 
fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Grabs the next frame from the first video track, once it's rendered. More...
 
 Media ()
 Initializes a new instance of the fm.liveswitch.Media class. More...
 
void removeOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the first audio track is destroyed. More...
 
void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised whenever the level of the first audio track is calculated. More...
 
void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the first video track is destroyed. More...
 
void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the size of the first video track is calculated. More...
 
- Public Member Functions inherited from fm.liveswitch.MediaBase< TAudioTrack, TVideoTrack >
abstract void addOnAudioDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the first audio track is destroyed. More...
 
abstract void addOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised whenever the level of the first audio track is calculated. More...
 
abstract void addOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the first video track is destroyed. More...
 
abstract void addOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Adds a handler that is raised whenever the size of the first video track is calculated. More...
 
abstract void destroy ()
 Destroys this media. More...
 
double getAudioGain ()
 Gets a value indicating the gain (input amplification) of the first audio track. More...
 
boolean getAudioMuted ()
 Gets a value indicating whether the first audio track is muted. More...
 
TIAudioTrack getAudioTrack ()
 Gets the first audio track. More...
 
abstract TIAudioTrack[] getAudioTracks ()
 Gets the audio tracks. More...
 
double getAudioVolume ()
 Gets a value indicating the volume (output resistance) of the first audio track. More...
 
String getId ()
 Gets the identifier. More...
 
boolean getVideoMuted ()
 Gets a value indicating whether the first video track is muted. More...
 
abstract fm.liveswitch.Size getVideoSize ()
 Gets the size of the first video track. More...
 
TIVideoTrack getVideoTrack ()
 Gets the first video track. More...
 
abstract TIVideoTrack[] getVideoTracks ()
 Gets the video tracks. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.VideoBuffergrabVideoFrame ()
 Grabs a frame from the first video track. 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 first audio track is destroyed. More...
 
abstract void removeOnAudioLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised whenever the level of the first audio track is calculated. More...
 
abstract void removeOnVideoDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the first video track is destroyed. More...
 
abstract void removeOnVideoSize (fm.liveswitch.IAction1< fm.liveswitch.Size > value)
 Removes a handler that is raised whenever the size of the first video track is calculated. More...
 
void setAudioGain (double value)
 Sets a value indicating the gain (input amplification) of the first audio track. More...
 
void setAudioMuted (boolean value)
 Sets a value indicating whether the first audio track is muted. More...
 
void setAudioVolume (double value)
 Sets a value indicating the volume (output resistance) of the first audio track. More...
 
void setId (String value)
 Sets the identifier. More...
 
void setVideoMuted (boolean value)
 Sets a value indicating whether the first video track is muted. More...
 

Protected Member Functions

void addAudioTrack (TAudioTrack audioTrack)
 Adds an audio track. More...
 
void addVideoTrack (TVideoTrack videoTrack)
 Adds a video track. More...
 
abstract TAudioTrack[] arrayFromAudioTracks (java.util.ArrayList< TAudioTrack > tracks)
 Creates an array of tracks from a list of audio tracks. More...
 
abstract TVideoTrack[] arrayFromVideoTracks (java.util.ArrayList< TVideoTrack > tracks)
 Creates an array of tracks from a list of video tracks. More...
 
abstract java.util.ArrayList< TAudioTrack > createAudioTrackCollection ()
 Creates an audio track collection. More...
 
abstract java.util.ArrayList< TVideoTrack > createVideoTrackCollection ()
 Creates a video track collection. More...
 
boolean removeAudioTrack (TAudioTrack audioTrack)
 Removes an audio track. More...
 
boolean removeVideoTrack (TVideoTrack videoTrack)
 Removes a video track. More...
 
void setIsRecordingAudio (boolean value)
 Sets a value indicating whether audio is being recorded. More...
 
void setIsRecordingVideo (boolean value)
 Sets a value indicating whether video is being recorded. More...
 

Detailed Description

A collection of audio/video tracks.

Constructor & Destructor Documentation

◆ Media()

fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.Media ( )

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

Member Function Documentation

◆ addAudioTrack()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addAudioTrack ( TAudioTrack  audioTrack)
protected

Adds an audio track.

Parameters
audioTrackThe audio track.

◆ addOnAudioDestroyed()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addOnAudioDestroyed ( fm.liveswitch.IAction0  value)

Adds a handler that is raised when the first audio track is destroyed.

◆ addOnAudioLevel()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addOnAudioLevel ( fm.liveswitch.IAction1< Double >  value)

Adds a handler that is raised whenever the level of the first audio track is calculated.

◆ addOnVideoDestroyed()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addOnVideoDestroyed ( fm.liveswitch.IAction0  value)

Adds a handler that is raised when the first video track is destroyed.

◆ addOnVideoSize()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addOnVideoSize ( fm.liveswitch.IAction1< fm.liveswitch.Size value)

Adds a handler that is raised whenever the size of the first video track is calculated.

◆ addVideoTrack()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.addVideoTrack ( TVideoTrack  videoTrack)
protected

Adds a video track.

Parameters
videoTrackThe video track.

◆ arrayFromAudioTracks()

abstract TAudioTrack [] fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.arrayFromAudioTracks ( java.util.ArrayList< TAudioTrack >  tracks)
abstractprotected

Creates an array of tracks from a list of audio tracks.

Parameters
tracksThe list of tracks.

◆ arrayFromVideoTracks()

abstract TVideoTrack [] fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.arrayFromVideoTracks ( java.util.ArrayList< TVideoTrack >  tracks)
abstractprotected

Creates an array of tracks from a list of video tracks.

Parameters
tracksThe list of tracks.

◆ createAudioTrackCollection()

abstract java.util.ArrayList<TAudioTrack> fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.createAudioTrackCollection ( )
abstractprotected

Creates an audio track collection.

Reimplemented in fm.liveswitch.LocalMedia.

◆ createVideoTrackCollection()

abstract java.util.ArrayList<TVideoTrack> fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.createVideoTrackCollection ( )
abstractprotected

Creates a video track collection.

Reimplemented in fm.liveswitch.LocalMedia.

◆ destroy()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.destroy ( )

Destroys this media.

Reimplemented in fm.liveswitch.RtcLocalMedia< TView >.

◆ getAudioTracks()

TAudioTrack [] fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.getAudioTracks ( )

Gets the audio tracks.

◆ getIsRecordingAudio()

boolean fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.getIsRecordingAudio ( )

Gets a value indicating whether audio is being recorded.

◆ getIsRecordingVideo()

boolean fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.getIsRecordingVideo ( )

Gets a value indicating whether video is being recorded.

◆ getVideoSize()

fm.liveswitch.Size fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.getVideoSize ( )

Gets the size of the first video track.

◆ getVideoTracks()

TVideoTrack [] fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.getVideoTracks ( )

Gets the video tracks.

◆ grabVideoFrame()

Grabs the next frame from the first video track, once it's rendered.

◆ removeAudioTrack()

boolean fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeAudioTrack ( TAudioTrack  audioTrack)
protected

Removes an audio track.

Parameters
audioTrackThe audio track.

◆ removeOnAudioDestroyed()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeOnAudioDestroyed ( fm.liveswitch.IAction0  value)

Removes a handler that is raised when the first audio track is destroyed.

◆ removeOnAudioLevel()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeOnAudioLevel ( fm.liveswitch.IAction1< Double >  value)

Removes a handler that is raised whenever the level of the first audio track is calculated.

◆ removeOnVideoDestroyed()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeOnVideoDestroyed ( fm.liveswitch.IAction0  value)

Removes a handler that is raised when the first video track is destroyed.

◆ removeOnVideoSize()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeOnVideoSize ( fm.liveswitch.IAction1< fm.liveswitch.Size value)

Removes a handler that is raised whenever the size of the first video track is calculated.

◆ removeVideoTrack()

boolean fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.removeVideoTrack ( TVideoTrack  videoTrack)
protected

Removes a video track.

Parameters
videoTrackThe video track.

◆ setIsRecordingAudio()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.setIsRecordingAudio ( boolean  value)
protected

Sets a value indicating whether audio is being recorded.

◆ setIsRecordingVideo()

void fm.liveswitch.Media< TAudioTrack extends fm.liveswitch.AudioTrack, TVideoTrack extends fm.liveswitch.VideoTrack >.setIsRecordingVideo ( boolean  value)
protected

Sets a value indicating whether video is being recorded.