Class MediaController
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
Provides a means to send commands to and handle events from media control server.
public class MediaController
- Inheritance
-
objectMedia
Controller
Properties
View SourceIsStopped
Gets a value indicating whether the sever has been stopped.
Declaration
public bool IsStopped { get; }
Property Value
Type | Description |
---|---|
bool | true if the server has been stopped; otherwise, false. |
ServerAppId
Gets the application id of the server.
Declaration
public string ServerAppId { get; }
Property Value
Type | Description |
---|---|
string | The server application id. |
Methods
View SourceGetAgeRatingOfCurrentPlayingMedia()
Gets the age rating of current playing media.
Declaration
public int GetAgeRatingOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
int | The Age rating of current playing media. The range is 0 to 19, inclusive. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetContentTypeOfCurrentPlayingMedia()
Gets the content type of current playing media.
Declaration
public MediaControlContentType GetContentTypeOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetIconPath()
Gets the icon path.
Declaration
public string GetIconPath()
Returns
Type | Description |
---|---|
string | The icon path. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetIndexOfCurrentPlayingMedia()
Returns the index of current playing media.
Declaration
public string GetIndexOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
string | The index of current playing media. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetMetadata()
Returns the metadata set by the server.
Declaration
public MediaControlMetadata GetMetadata()
Returns
Type | Description |
---|---|
Media |
The metadata. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
See Also
View SourceGetPlaybackCapabilities()
Gets the value whether Media
Declaration
public Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> GetPlaybackCapabilities()
Returns
Type | Description |
---|---|
System. |
the set of Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetPlaybackCapability(MediaControlPlaybackCommand)
Gets the value whether action
is supported or not.
Declaration
public MediaControlCapabilitySupport GetPlaybackCapability(MediaControlPlaybackCommand action)
Parameters
Type | Name | Description |
---|---|---|
Media |
action | A playback command. |
Returns
Type | Description |
---|---|
Media |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
The server has already been stopped. |
System. |
The Media |
GetPlaybackPosition()
Returns the playback position set by the server.
Declaration
public long GetPlaybackPosition()
Returns
Type | Description |
---|---|
long | The playback position in milliseconds. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
See Also
View SourceGetPlaybackState()
Returns the playback state set by the server.
Declaration
public MediaControlPlaybackState GetPlaybackState()
Returns
Type | Description |
---|---|
Media |
The playback state. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
See Also
View SourceGetPlaylistOfCurrentPlayingMedia()
Returns the playlist name of current playing media.
Declaration
public MediaControlPlaylist GetPlaylistOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
Media |
The playlist name. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetPlaylists()
Returns the all playlists.
Declaration
public IEnumerable<MediaControlPlaylist> GetPlaylists()
Returns
Type | Description |
---|---|
System. |
The set of Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetRepeatMode()
Returns the repeat mode.
Declaration
public MediaControlRepeatMode GetRepeatMode()
Returns
Type | Description |
---|---|
Media |
A Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
See Also
View SourceGetRepeatModeCapability()
Gets the value whether the repeat mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetRepeatModeCapability()
Returns
Type | Description |
---|---|
Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
GetShuffleModeCapability()
Gets the value whether the shuffle mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetShuffleModeCapability()
Returns
Type | Description |
---|---|
Media |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
IsShuffleModeEnabled()
Returns whether the shuffle mode is enabled.
Declaration
public bool IsShuffleModeEnabled()
Returns
Type | Description |
---|---|
bool | A value indicating whether the shuffle mode is enabled. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
The Media |
See Also
View SourceRequestAsync(Command)
Requests command to the server.
Declaration
public Task<Bundle> RequestAsync(Command command)
Parameters
Returns
Type | Description |
---|---|
System. |
Bundle represents the extra data from server and it can be null. |
Remarks
The client can request the server to execute Playback
and then, the client receive the result of each request(command).
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
The server has already been stopped. |
System. |
The Media |
Response(Command, int, Bundle)
Sends the result of each command.
Declaration
public void Response(Command command, int result, Bundle bundle)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
int | result | The result of |
Bundle | bundle | The extra data. |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
The server is not running . |
Response(Command, int)
Sends the result of each command.
Declaration
public void Response(Command command, int result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
int | result | The result of |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
The server is not running . |
SendPlaybackCommand(MediaControlPlaybackCommand)
Sends playback command to the server.
Declaration
[Obsolete("Please do not use! This will be deprecated. Please use Request instead.")]
public void SendPlaybackCommand(MediaControlPlaybackCommand command)
Parameters
Type | Name | Description |
---|---|---|
Media |
command | A playback command. |
Exceptions
Type | Condition |
---|---|
System. |
The server has already been stopped. |
System. |
|
System. |
The Media |
See Also
Events
View SourceCustomCommandReceived
Occurs when a server sends custom event.
Declaration
public event EventHandler<CustomCommandReceivedEventArgs> CustomCommandReceived
Event Type
Type | Description |
---|---|
System. |
MetadataUpdated
Occurs when the metadata is updated.
Declaration
public event EventHandler<MetadataUpdatedEventArgs> MetadataUpdated
Event Type
Type | Description |
---|---|
System. |
PlaybackCapabilityUpdated
Occurs when the playback capabilities are updated.
Declaration
public event EventHandler<PlaybackCapabilityUpdatedEventArgs> PlaybackCapabilityUpdated
Event Type
Type | Description |
---|---|
System. |
PlaybackStateUpdated
Occurs when the playback state is updated.
Declaration
public event EventHandler<PlaybackStateUpdatedEventArgs> PlaybackStateUpdated
Event Type
Type | Description |
---|---|
System. |
PlaylistUpdated
Occurs when the playlist is updated.
Declaration
public event EventHandler<PlaylistUpdatedEventArgs> PlaylistUpdated
Event Type
Type | Description |
---|---|
System. |
RepeatModeCapabilityUpdated
Occurs when the repeat mode capabilities are updated.
Declaration
public event EventHandler<RepeatModeCapabilityUpdatedEventArgs> RepeatModeCapabilityUpdated
Event Type
Type | Description |
---|---|
System. |
RepeatModeUpdated
Occurs when the repeat mode is updated.
Declaration
public event EventHandler<RepeatModeUpdatedEventArgs> RepeatModeUpdated
Event Type
Type | Description |
---|---|
System. |
ServerStopped
Occurs when the server is stopped.
Declaration
public event EventHandler ServerStopped
Event Type
Type | Description |
---|---|
System. |
ShuffleModeCapabilityUpdated
Occurs when the shuffle mode capabilities are updated.
Declaration
public event EventHandler<ShuffleModeCapabilityUpdatedEventArgs> ShuffleModeCapabilityUpdated
Event Type
Type | Description |
---|---|
System. |
ShuffleModeUpdated
Occurs when the shuffle mode is updated.
Declaration
public event EventHandler<ShuffleModeUpdatedEventArgs> ShuffleModeUpdated
Event Type
Type | Description |
---|---|
System. |