Class MediaSource

Definition

Namespace:
Tizen.Multimedia.Remoting
Assembly:
Tizen.Multimedia.Remoting.dll

MediaSource is a base class for WebRTC sources.

C#
Copy
public abstract class MediaSource
Inheritance
object
MediaSource
Derived
Tizen.Multimedia.Remoting.MediaFileSource
Tizen.Multimedia.Remoting.MediaFileSource
Tizen.Multimedia.Remoting.MediaFileSource
Tizen.Multimedia.Remoting.MediaFileSource
Tizen.Multimedia.Remoting.MediaFileSource
Tizen.Multimedia.Remoting.MediaNullSource
Tizen.Multimedia.Remoting.MediaNullSource
Tizen.Multimedia.Remoting.MediaNullSource
Tizen.Multimedia.Remoting.MediaNullSource
Tizen.Multimedia.Remoting.MediaNullSource

Constructors

View Source

MediaSource(MediaType)

Initializes a new instance of the MediaSource class.

Declaration
C#
Copy
protected MediaSource(MediaType mediaType)
Parameters
Type Name Description
MediaType mediaType

Properties

View Source

MediaType

Gets the type of MediaSource.

Declaration
C#
Copy
protected MediaType MediaType { get; }
Property Value
Type Description
MediaType

MediaType

View Source

Mute

Gets or sets the mute status of the current media source.

Declaration
C#
Copy
public bool Mute { get; set; }
Property Value
Type Description
bool

A value that specifies the mute status.

Exceptions
Type Condition
System.InvalidOperationException

MediaSource is not attached yet.

System.ObjectDisposedException

The WebRTC has already been disposed.

View Source

Pause

Gets or sets the pause status of current media source.

Declaration
C#
Copy
public bool Pause { get; set; }
Property Value
Type Description
bool

A value that specifies the pause status.

Exceptions
Type Condition
System.InvalidOperationException

MediaSource is not attached yet.

System.ObjectDisposedException

The WebRTC has already been disposed.

View Source

TransceiverDirection

Gets or sets the transceiver direction of current media source.

Declaration
C#
Copy
public TransceiverDirection TransceiverDirection { get; set; }
Property Value
Type Description
TransceiverDirection

A TransceiverDirection that specifies the transceiver direction.

Exceptions
Type Condition
System.InvalidOperationException

MediaSource is not attached yet.

System.ObjectDisposedException

The WebRTC has already been disposed.

View Source

VideoResolution

Gets or sets the video resolution of the current media source.

Declaration
C#
Copy
public Size VideoResolution { get; set; }
Property Value
Type Description
Size

A value that specifies the mute status.

Exceptions
Type Condition
System.InvalidOperationException

MediaSource is not attached yet.
-or-
This MediaSource is not Video

System.ObjectDisposedException

The WebRTC has already been disposed.

Methods

View Source

EnableAudioLoopback(AudioStreamPolicy)

Enables the audio loopback. The local audio will be played with policy.

Declaration
C#
Copy
public MediaStreamTrack EnableAudioLoopback(AudioStreamPolicy policy)
Parameters
Type Name Description
AudioStreamPolicy policy

The AudioStreamPolicy to apply.

Returns
Type Description
MediaStreamTrack

MediaStreamTrack

Remarks

MediaSource does not support all AudioStreamType.
Supported types are Media, Voip, MediaExternalOnly.

Exceptions
Type Condition
System.ArgumentNullException

policy is null.

System.InvalidOperationException

MediaSource is not attached yet.
-or-
This MediaSource is not Audio

System.NotSupportedException

AudioStreamType of policy is not supported on the current platform.

System.ObjectDisposedException

policy or WebRTC has already been disposed.

View Source

EnableVideoLoopback(Display)

Enables the video loopback. The local video will be diaplayed in display.

Declaration
C#
Copy
public MediaStreamTrack EnableVideoLoopback(Display display)
Parameters
Type Name Description
Display display

The Display to apply.

Returns
Type Description
MediaStreamTrack

MediaStreamTrack

Exceptions
Type Condition
System.ArgumentException

The display has already been assigned to another.

System.ArgumentNullException

display is null.

System.InvalidOperationException

MediaSource is not attached yet.
-or-
This MediaSource is not Video

System.ObjectDisposedException

The WebRTC has already been disposed.