Class MediaController
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 4
Provides a means to send commands to and handle events from media control server.
public class MediaController
- Inheritance
-
MediaController
Properties
View SourceIsStopped
Gets a value indicating whether the sever has been stopped.
Declaration
public bool IsStopped { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the server has been stopped; otherwise, false. |
API Level: 4
View SourceServerAppId
Gets the application id of the server.
Declaration
public string ServerAppId { get; }
Property Value
Type | Description |
---|---|
String | The server application id. |
API Level: 4
Methods
View SourceGetAgeRatingOfCurrentPlayingMedia()
Gets the age rating of current playing media.
Declaration
public int GetAgeRatingOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
Int32 | The Age rating of current playing media. The range is 0 to 19, inclusive. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetContentTypeOfCurrentPlayingMedia()
Gets the content type of current playing media.
Declaration
public MediaControlContentType GetContentTypeOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
MediaControlContentType |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetDisplayMode()
Gets the current display mode.
Declaration
public MediaControlDisplayMode GetDisplayMode()
Returns
Type | Description |
---|---|
MediaControlDisplayMode |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceGetDisplayModeCapability()
Gets the value whether the repeat mode is supported or not.
Declaration
public IEnumerable<MediaControlDisplayMode> GetDisplayModeCapability()
Returns
Type | Description |
---|---|
IEnumerable<MediaControlDisplayMode> | If there's no supported display mode by server, it will return null. otherwise, it will return the supported list of MediaControlDisplayMode. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceGetDisplayRotation()
Gets the current display rotation.
Declaration
public Rotation GetDisplayRotation()
Returns
Type | Description |
---|---|
Rotation | The Rotation. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceGetDisplayRotationCapability()
Gets the value whether the display mode is supported or not.
Declaration
public IEnumerable<Rotation> GetDisplayRotationCapability()
Returns
Type | Description |
---|---|
IEnumerable<Rotation> | If there's no supported display rotation by server, it will return null. otherwise, it will return the supported list of Rotation. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceGetIconPath()
Gets the icon path.
Declaration
public string GetIconPath()
Returns
Type | Description |
---|---|
String | The icon path. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetIndexOfCurrentPlayingMedia()
Returns the index of current playing media.
Declaration
public string GetIndexOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
String | The index of current playing media. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetMetadata()
Returns the metadata set by the server.
Declaration
public MediaControlMetadata GetMetadata()
Returns
Type | Description |
---|---|
MediaControlMetadata | The metadata. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
View SourceGetMode360Capability()
Gets the value whether the 360 mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetMode360Capability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceGetPlaybackCapabilities()
Gets the value whether MediaControlPlaybackCommand is supported or not.
Declaration
public Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> GetPlaybackCapabilities()
Returns
Type | Description |
---|---|
Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> | the set of MediaControlPlaybackCommand and MediaControlCapabilitySupport. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetPlaybackCapability(MediaControlPlaybackCommand)
Gets the value whether action
is supported or not.
Declaration
public MediaControlCapabilitySupport GetPlaybackCapability(MediaControlPlaybackCommand action)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackCommand | action | A playback command. |
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetPlaybackPosition()
Returns the playback position set by the server.
Declaration
public long GetPlaybackPosition()
Returns
Type | Description |
---|---|
Int64 | The playback position in milliseconds. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
View SourceGetPlaybackState()
Returns the playback state set by the server.
Declaration
public MediaControlPlaybackState GetPlaybackState()
Returns
Type | Description |
---|---|
MediaControlPlaybackState | The playback state. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
View SourceGetPlaylistOfCurrentPlayingMedia()
Returns the playlist name of current playing media.
Declaration
public MediaControlPlaylist GetPlaylistOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
MediaControlPlaylist | The playlist name. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetPlaylists()
Returns the all playlists.
Declaration
public IEnumerable<MediaControlPlaylist> GetPlaylists()
Returns
Type | Description |
---|---|
IEnumerable<MediaControlPlaylist> | The set of MediaControlPlaylist. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetRepeatMode()
Returns the repeat mode.
Declaration
public MediaControlRepeatMode GetRepeatMode()
Returns
Type | Description |
---|---|
MediaControlRepeatMode | A MediaControlRepeatMode set by the server. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
View SourceGetRepeatModeCapability()
Gets the value whether the repeat mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetRepeatModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetShuffleModeCapability()
Gets the value whether the shuffle mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetShuffleModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
View SourceGetSubtitleModeCapability()
Gets the value whether the subtitle mode is supported or not.
Declaration
public MediaControlCapabilitySupport GetSubtitleModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceIsMode360Enabled()
Gets whether the 360 mode is enabled or not.
Declaration
public bool IsMode360Enabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the 360 mode is enabled or not. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceIsShuffleModeEnabled()
Returns whether the shuffle mode is enabled.
Declaration
public bool IsShuffleModeEnabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the shuffle mode is enabled. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
View SourceIsSubtitleModeEnabled()
Gets whether the subtitle mode is enabled or not.
Declaration
public bool IsSubtitleModeEnabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the subtitle mode is enabled or not. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
View SourceRequestAsync(Command)
Requests command to the server.
Declaration
[Obsolete("Deprecated since API8; Will be removed in API10. Please use RequestCommandAsync(Command command) instead.")]
public Task<Bundle> RequestAsync(Command command)
Parameters
Type | Name | Description |
---|---|---|
Command | command | A Command class. |
Returns
Type | Description |
---|---|
Task<Bundle> | Bundle represents the extra data from server and it can be null. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 5
View SourceRequestCommandAsync(Command)
Requests a command to the server and client receives the result of each request(command).
Declaration
public Task<(Bundle bundle, int result)> RequestCommandAsync(Command command)
Parameters
Type | Name | Description |
---|---|---|
Command | command | A Command class. |
Returns
Type | Description |
---|---|
Task<ValueTuple<Bundle, Int32>> | The type of return value is Tuple. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 8
View SourceResponse(Command, Int32)
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. |
Int32 | result | The result of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server is not running . |
API Level: 5
View SourceResponse(Command, Int32, 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. |
Int32 | result | The result of |
Bundle | bundle | The extra data. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server is not running . |
API Level: 5
View SourceResponse(Command, MediaControlResult)
Sends the result of each command.
Declaration
public void Response(Command command, MediaControlResult result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
MediaControlResult | result | The MediaControlResult of |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server is not running . |
API Level: 8
View SourceResponse(Command, MediaControlResult, Bundle)
Sends the result of each command.
Declaration
public void Response(Command command, MediaControlResult result, Bundle bundle)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
MediaControlResult | result | The MediaControlResult of |
Bundle | bundle | The extra data. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidOperationException | The server is not running . |
API Level: 8
View SourceSendPlaybackCommand(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 |
---|---|---|
MediaControlPlaybackCommand | command | A playback command. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The server has already been stopped. |
ArgumentException |
|
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
Events
View SourceCustomCommandReceived
Occurs when a server sends custom event.
Declaration
public event EventHandler<CustomCommandReceivedEventArgs> CustomCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<CustomCommandReceivedEventArgs> |
API Level: 5
View SourceDisplayModeCapabilityUpdated
Occurs when the display mode capabilities are updated.
Declaration
public event EventHandler<DisplayModeCapabilityUpdatedEventArgs> DisplayModeCapabilityUpdated
Event Type
Type | Description |
---|---|
EventHandler<DisplayModeCapabilityUpdatedEventArgs> |
API Level: 6
View SourceDisplayModeUpdated
Occurs when the display mode is updated.
Declaration
public event EventHandler<DisplayModeUpdatedEventArgs> DisplayModeUpdated
Event Type
Type | Description |
---|---|
EventHandler<DisplayModeUpdatedEventArgs> |
API Level: 6
View SourceDisplayRotationCapabilityUpdated
Occurs when the display rotation capabilities are updated.
Declaration
public event EventHandler<DisplayRotationCapabilityUpdatedEventArgs> DisplayRotationCapabilityUpdated
Event Type
Type | Description |
---|---|
EventHandler<DisplayRotationCapabilityUpdatedEventArgs> |
API Level: 6
View SourceDisplayRotationUpdated
Occurs when the display rotation is updated.
Declaration
public event EventHandler<DisplayRotationUpdatedEventArgs> DisplayRotationUpdated
Event Type
Type | Description |
---|---|
EventHandler<DisplayRotationUpdatedEventArgs> |
API Level: 6
View SourceMetadataUpdated
Occurs when the metadata is updated.
Declaration
public event EventHandler<MetadataUpdatedEventArgs> MetadataUpdated
Event Type
Type | Description |
---|---|
EventHandler<MetadataUpdatedEventArgs> |
API Level: 4
View SourceMode360Updated
Occurs when the 360 mode is updated.
Declaration
public event EventHandler<Mode360UpdatedEventArgs> Mode360Updated
Event Type
Type | Description |
---|---|
EventHandler<Mode360UpdatedEventArgs> |
API Level: 6
View SourcePlaybackCapabilityUpdated
Occurs when the playback capabilities are updated.
Declaration
public event EventHandler<PlaybackCapabilityUpdatedEventArgs> PlaybackCapabilityUpdated
Event Type
Type | Description |
---|---|
EventHandler<PlaybackCapabilityUpdatedEventArgs> |
API Level: 5
View SourcePlaybackStateUpdated
Occurs when the playback state is updated.
Declaration
public event EventHandler<PlaybackStateUpdatedEventArgs> PlaybackStateUpdated
Event Type
Type | Description |
---|---|
EventHandler<PlaybackStateUpdatedEventArgs> |
API Level: 4
View SourcePlaylistUpdated
Occurs when the playlist is updated.
Declaration
public event EventHandler<PlaylistUpdatedEventArgs> PlaylistUpdated
Event Type
Type | Description |
---|---|
EventHandler<PlaylistUpdatedEventArgs> |
API Level: 5
View SourceRepeatModeCapabilityUpdated
Occurs when the repeat mode capabilities are updated.
Declaration
public event EventHandler<RepeatModeCapabilityUpdatedEventArgs> RepeatModeCapabilityUpdated
Event Type
Type | Description |
---|---|
EventHandler<RepeatModeCapabilityUpdatedEventArgs> |
API Level: 5
View SourceRepeatModeUpdated
Occurs when the repeat mode is updated.
Declaration
public event EventHandler<RepeatModeUpdatedEventArgs> RepeatModeUpdated
Event Type
Type | Description |
---|---|
EventHandler<RepeatModeUpdatedEventArgs> |
API Level: 4
View SourceServerStopped
Occurs when the server is stopped.
Declaration
public event EventHandler ServerStopped
Event Type
Type | Description |
---|---|
EventHandler |
API Level: 4
View SourceShuffleModeCapabilityUpdated
Occurs when the shuffle mode capabilities are updated.
Declaration
public event EventHandler<ShuffleModeCapabilityUpdatedEventArgs> ShuffleModeCapabilityUpdated
Event Type
Type | Description |
---|---|
EventHandler<ShuffleModeCapabilityUpdatedEventArgs> |
API Level: 5
View SourceShuffleModeUpdated
Occurs when the shuffle mode is updated.
Declaration
public event EventHandler<ShuffleModeUpdatedEventArgs> ShuffleModeUpdated
Event Type
Type | Description |
---|---|
EventHandler<ShuffleModeUpdatedEventArgs> |
API Level: 4
View SourceSubtitleModeUpdated
Occurs when the subtitle mode is updated.
Declaration
public event EventHandler<SubtitleModeUpdatedEventArgs> SubtitleModeUpdated
Event Type
Type | Description |
---|---|
EventHandler<SubtitleModeUpdatedEventArgs> |