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.
C#Copypublic class MediaController
- Inheritance
-
System.ObjectMediaController
Properties
Declaration
C#Copypublic bool IsStopped { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the server has been stopped; otherwise, false. |
API Level: 4
Declaration
C#Copypublic string ServerAppId { get; }
Property Value
Type | Description |
---|---|
System.String | The server application id. |
API Level: 4
Methods
Declaration
C#Copypublic int GetAgeRatingOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
Int32 | The Age rating of current playing media. The range is 0 to 19, inclusive. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic MediaControlContentType GetContentTypeOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
MediaControlContentType |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic MediaControlDisplayMode GetDisplayMode()
Returns
Type | Description |
---|---|
MediaControlDisplayMode |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copypublic IEnumerable<MediaControlDisplayMode> GetDisplayModeCapability()
Returns
Type | Description |
---|---|
System.Collections.Generic.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 |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copypublic Rotation GetDisplayRotation()
Returns
Type | Description |
---|---|
Rotation | The Rotation. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
GetDisplayRotationCapability()
Gets the value whether the display mode is supported or not.
Declaration
C#Copypublic IEnumerable<Rotation> GetDisplayRotationCapability()
Returns
Type | Description |
---|---|
System.Collections.Generic.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 |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copypublic string GetIconPath()
Returns
Type | Description |
---|---|
System.String | The icon path. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic string GetIndexOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
System.String | The index of current playing media. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic MediaControlMetadata GetMetadata()
Returns
Type | Description |
---|---|
MediaControlMetadata | The metadata. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
Declaration
C#Copypublic MediaControlCapabilitySupport GetMode360Capability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
GetPlaybackCapabilities()
Gets the value whether MediaControlPlaybackCommand is supported or not.
Declaration
C#Copypublic Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> GetPlaybackCapabilities()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> | the set of MediaControlPlaybackCommand and MediaControlCapabilitySupport. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
GetPlaybackCapability(MediaControlPlaybackCommand)
Gets the value whether action
is supported or not.
Declaration
C#Copypublic MediaControlCapabilitySupport GetPlaybackCapability(MediaControlPlaybackCommand action)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackCommand | action | A playback command. |
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic long GetPlaybackPosition()
Returns
Type | Description |
---|---|
System.Int64 | The playback position in milliseconds. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 4
Declaration
C#Copypublic MediaControlPlaybackState GetPlaybackState()
Returns
Type | Description |
---|---|
MediaControlPlaybackState | The playback state. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 4
Declaration
C#Copypublic MediaControlPlaylist GetPlaylistOfCurrentPlayingMedia()
Returns
Type | Description |
---|---|
MediaControlPlaylist | The playlist name. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic IEnumerable<MediaControlPlaylist> GetPlaylists()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MediaControlPlaylist> | The set of MediaControlPlaylist. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic MediaControlRepeatMode GetRepeatMode()
Returns
Type | Description |
---|---|
MediaControlRepeatMode | A MediaControlRepeatMode set by the server. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 4
Declaration
C#Copypublic MediaControlCapabilitySupport GetRepeatModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
Declaration
C#Copypublic MediaControlCapabilitySupport GetShuffleModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 5
GetSubtitleModeCapability()
Gets the value whether the subtitle mode is supported or not.
Declaration
C#Copypublic MediaControlCapabilitySupport GetSubtitleModeCapability()
Returns
Type | Description |
---|---|
MediaControlCapabilitySupport |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copypublic bool IsMode360Enabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the 360 mode is enabled or not. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copypublic bool IsShuffleModeEnabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the shuffle mode is enabled. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
Declaration
C#Copypublic bool IsSubtitleModeEnabled()
Returns
Type | Description |
---|---|
Boolean | A value indicating whether the subtitle mode is enabled or not. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
API Level: 6
Declaration
C#Copy[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 |
---|---|
System.Threading.Tasks.Task<Bundle> | Bundle represents the extra data from server and it can be null. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 5
RequestCommandAsync(Command)
Requests a command to the server and client receives the result of each request(command).
Declaration
C#Copypublic Task<(Bundle bundle, int result)> RequestCommandAsync(Command command)
Parameters
Type | Name | Description |
---|---|---|
Command | command | A Command class. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ValueTuple<Bundle, Int32>> | The type of return value is Tuple. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server has already been stopped. |
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 8
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server is not running . |
API Level: 5
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server is not running . |
API Level: 5
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server is not running . |
API Level: 8
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | The server is not running . |
API Level: 8
Declaration
C#Copy[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 |
---|---|
System.InvalidOperationException | The server has already been stopped. |
System.ArgumentException |
|
ObjectDisposedException | The MediaControllerManager has already been disposed. |
See Also
API Level: 4
Events
Declaration
C#Copypublic event EventHandler<CustomCommandReceivedEventArgs> CustomCommandReceived
Event Type
Type | Description |
---|---|
System.EventHandler<CustomCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<DisplayModeCapabilityUpdatedEventArgs> DisplayModeCapabilityUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<DisplayModeCapabilityUpdatedEventArgs> |
API Level: 6
Declaration
C#Copypublic event EventHandler<DisplayModeUpdatedEventArgs> DisplayModeUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<DisplayModeUpdatedEventArgs> |
API Level: 6
DisplayRotationCapabilityUpdated
Occurs when the display rotation capabilities are updated.
Declaration
C#Copypublic event EventHandler<DisplayRotationCapabilityUpdatedEventArgs> DisplayRotationCapabilityUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<DisplayRotationCapabilityUpdatedEventArgs> |
API Level: 6
Declaration
C#Copypublic event EventHandler<DisplayRotationUpdatedEventArgs> DisplayRotationUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<DisplayRotationUpdatedEventArgs> |
API Level: 6
Declaration
C#Copypublic event EventHandler<MetadataUpdatedEventArgs> MetadataUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<MetadataUpdatedEventArgs> |
API Level: 4
Declaration
C#Copypublic event EventHandler<Mode360UpdatedEventArgs> Mode360Updated
Event Type
Type | Description |
---|---|
System.EventHandler<Mode360UpdatedEventArgs> |
API Level: 6
Declaration
C#Copypublic event EventHandler<PlaybackCapabilityUpdatedEventArgs> PlaybackCapabilityUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<PlaybackCapabilityUpdatedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<PlaybackStateUpdatedEventArgs> PlaybackStateUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<PlaybackStateUpdatedEventArgs> |
API Level: 4
Declaration
C#Copypublic event EventHandler<PlaylistUpdatedEventArgs> PlaylistUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<PlaylistUpdatedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<RepeatModeCapabilityUpdatedEventArgs> RepeatModeCapabilityUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<RepeatModeCapabilityUpdatedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<RepeatModeUpdatedEventArgs> RepeatModeUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<RepeatModeUpdatedEventArgs> |
API Level: 4
Declaration
C#Copypublic event EventHandler ServerStopped
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 4
Declaration
C#Copypublic event EventHandler<ShuffleModeCapabilityUpdatedEventArgs> ShuffleModeCapabilityUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<ShuffleModeCapabilityUpdatedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<ShuffleModeUpdatedEventArgs> ShuffleModeUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<ShuffleModeUpdatedEventArgs> |
API Level: 4
Declaration
C#Copypublic event EventHandler<SubtitleModeUpdatedEventArgs> SubtitleModeUpdated
Event Type
Type | Description |
---|---|
System.EventHandler<SubtitleModeUpdatedEventArgs> |