Class MediaBase<TIAudioTrack, TIVideoTrack>
A collection of audio/video track base methods/properties.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class MediaBase<TIAudioTrack, TIVideoTrack> : Dynamic, IEquatable<NSObject>, INSObjectProtocol, INativeObject, IDisposable, IMedia<TIAudioTrack, TIVideoTrack> where TIAudioTrack : IAudioTrack where TIVideoTrack : IVideoTrack
Type Parameters
Name | Description |
---|---|
TIAudioTrack | |
TIVideoTrack |
Constructors
MediaBase()
Initializes a new instance of the MediaBase<TIAudioTrack, TIVideoTrack> class.
Declaration
public MediaBase()
Properties
AudioGain
Gets or 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.
Declaration
public double AudioGain { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
AudioLevelInterval
Gets or sets the interval in milliseconds between OnAudioLevel events.
Declaration
public abstract int AudioLevelInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
AudioMuted
Gets or 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.
Declaration
public bool AudioMuted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AudioTrack
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.
Declaration
public TIAudioTrack AudioTrack { get; }
Property Value
Type | Description |
---|---|
TIAudioTrack |
AudioTracks
Gets all audio tracks from this media.
Declaration
public abstract TIAudioTrack[] AudioTracks { get; }
Property Value
Type | Description |
---|---|
TIAudioTrack[] |
AudioVolume
Gets or 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.
Declaration
public double AudioVolume { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Id
Gets or sets the unique identifier of this media.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VideoMuted
Gets or 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.
Declaration
public bool VideoMuted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VideoSize
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.
Declaration
public abstract Size VideoSize { get; }
Property Value
Type | Description |
---|---|
Size |
VideoTrack
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.
Declaration
public TIVideoTrack VideoTrack { get; }
Property Value
Type | Description |
---|---|
TIVideoTrack |
VideoTracks
Gets all video tracks from this media.
Declaration
public abstract TIVideoTrack[] VideoTracks { get; }
Property Value
Type | Description |
---|---|
TIVideoTrack[] |
Methods
Destroy()
Destroys this media stack.
Declaration
public abstract void Destroy()
GrabVideoFrame()
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.
Declaration
public abstract Future<VideoBuffer> GrabVideoFrame()
Returns
Type | Description |
---|---|
Future<VideoBuffer> | A future video buffer. |
Events
OnAudioDestroyed
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.
Declaration
public abstract event Action0 OnAudioDestroyed
Event Type
Type | Description |
---|---|
Action0 |
OnAudioLevel
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.
Declaration
public abstract event Action1<double> OnAudioLevel
Event Type
Type | Description |
---|---|
Action1<System.Double> |
OnVideoDestroyed
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.
Declaration
public abstract event Action0 OnVideoDestroyed
Event Type
Type | Description |
---|---|
Action0 |
OnVideoSize
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.
Declaration
public abstract event Action1<Size> OnVideoSize
Event Type
Type | Description |
---|---|
Action1<Size> |
OnVideoSizeChange
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.
Declaration
public abstract event Action1<Size> OnVideoSizeChange
Event Type
Type | Description |
---|---|
Action1<Size> |