Class MediaController

Definition

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

Provides a means to to send commands to and handle events from media control server.

C#
Copy
public class MediaController
Inheritance
object
MediaController

Properties

View Source

IsStopped

Gets a value indicating whether the sever has been stopped.

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

true if the server has been stopped; otherwise, false.

View Source

ServerAppId

Gets the application id of the server.

Declaration
C#
Copy
public string ServerAppId { get; }
Property Value
Type Description
string

The server application id.

Methods

View Source

GetMetadata()

Returns the metadata set by the server.

Declaration
C#
Copy
public MediaControlMetadata GetMetadata()
Returns
Type Description
MediaControlMetadata

The metadata.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

View Source

GetPlaybackPosition()

Returns the playback position set by the server.

Declaration
C#
Copy
public long GetPlaybackPosition()
Returns
Type Description
long

The playback position in milliseconds.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

View Source

GetPlaybackState()

Returns the playback state set by the server.

Declaration
C#
Copy
public MediaControlPlaybackState GetPlaybackState()
Returns
Type Description
MediaControlPlaybackState

The playback state.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

View Source

GetRepeatMode()

Returns the repeat mode.

Declaration
C#
Copy
public MediaControlRepeatMode GetRepeatMode()
Returns
Type Description
MediaControlRepeatMode

A MediaControlRepeatMode set by the server.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

View Source

IsShuffleModeEnabled()

Returns whether the shuffle mode is enabled.

Declaration
C#
Copy
public bool IsShuffleModeEnabled()
Returns
Type Description
bool

A value indicating whether the shuffle mode is enabled.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

View Source

SendPlaybackCommand(MediaControlPlaybackCommand)

Sends playback command to the server.

Declaration
C#
Copy
public void SendPlaybackCommand(MediaControlPlaybackCommand command)
Parameters
Type Name Description
MediaControlPlaybackCommand command

A playback command.

Exceptions
Type Condition
System.InvalidOperationException

The server has already been stopped.
-or-
An internal error occurs.

System.ArgumentException

command is not valid.

System.ObjectDisposedException

The MediaControllerManager has already been disposed of.

Events

View Source

MetadataUpdated

Occurs when the metadata is updated.

Declaration
C#
Copy
public event EventHandler<MetadataUpdatedEventArgs> MetadataUpdated
Event Type
Type Description
System.EventHandler<TEventArgs><MetadataUpdatedEventArgs>
View Source

PlaybackStateUpdated

Occurs when the playback state is updated.

Declaration
C#
Copy
public event EventHandler<PlaybackStateUpdatedEventArgs> PlaybackStateUpdated
Event Type
Type Description
System.EventHandler<TEventArgs><PlaybackStateUpdatedEventArgs>
View Source

RepeatModeUpdated

Occurs when the repeat mode is updated.

Declaration
C#
Copy
public event EventHandler<RepeatModeUpdatedEventArgs> RepeatModeUpdated
Event Type
Type Description
System.EventHandler<TEventArgs><RepeatModeUpdatedEventArgs>
View Source

ServerStopped

Occurs when the server is stopped.

Declaration
C#
Copy
public event EventHandler ServerStopped
Event Type
Type Description
System.EventHandler
View Source

ShuffleModeUpdated

Occurs when the shuffle mode is updated.

Declaration
C#
Copy
public event EventHandler<ShuffleModeUpdatedEventArgs> ShuffleModeUpdated
Event Type
Type Description
System.EventHandler<TEventArgs><ShuffleModeUpdatedEventArgs>