Class MediaControlServer
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 4
Provides a means to set playback information and metadata and receive commands from clients.
C#Copypublic static class MediaControlServer : object
- Inheritance
-
MediaControlServer
Properties
Declaration
C#Copypublic static bool IsRunning { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the server has started; otherwise, false. |
API Level: 4
Methods
Declaration
C#Copypublic static IEnumerable<string> GetActivatedClients()
Returns
Type | Description |
---|---|
IEnumerable<String> | the activated client ids. |
API Level: 5
Declaration
C#Copypublic static void RemovePlaylist(MediaControlPlaylist playlist)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaylist | playlist | The name of playlist. |
Remarks
Currently, only server can remove the playlist.
API Level: 5
Declaration
C#Copypublic static Task<Bundle> RequestAsync(Command command, string clientId)
Parameters
Type | Name | Description |
---|---|---|
Command | command | A Command class. |
String | clientId | The client Id to send command. |
Returns
Type | Description |
---|---|
Task<Bundle> |
See Also
API Level: 5
RequestCommandAsync(Command, String)
Requests a command to the client and server receives the result of each request(command).
Declaration
C#Copypublic static Task<(Bundle bundle, int result)> RequestCommandAsync(Command command, string clientId)
Parameters
Type | Name | Description |
---|---|---|
Command | command | A Command class. |
String | clientId | The client Id to send command. |
Returns
Type | Description |
---|---|
Task<ValueTuple<Bundle, Int32>> | The type of return value is Tuple. |
See Also
API Level: 8
Declaration
C#Copypublic static void Response(Command command, int result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
Int32 | result | The result of |
API Level: 5
Declaration
C#Copypublic static 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. |
API Level: 4
Declaration
C#Copypublic static void Response(Command command, MediaControlResult result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
MediaControlResult | result | The MediaControlResult of |
API Level: 8
Declaration
C#Copypublic static 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. |
API Level: 4
Declaration
C#Copypublic static void SetAgeRating(int ageRating)
Parameters
Type | Name | Description |
---|---|---|
Int32 | ageRating | The Age rating of latest played media. The valid range is 0 to 19, inclusive. Especially, 0 means that media is suitable for all ages. |
API Level: 5
SetCustomCommandCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating custom command is supported or not.
Declaration
C#Copypublic static void SetCustomCommandCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the custom command is supported or not. |
API Level: 11
Declaration
C#Copypublic static void SetDisplayMode(MediaControlDisplayMode mode)
Parameters
Type | Name | Description |
---|---|---|
MediaControlDisplayMode | mode | A value indicating the MediaControlDisplayMode. |
API Level: 6
SetDisplayModeCapabilities(IDictionary<MediaControlDisplayMode, MediaControlCapabilitySupport>)
Sets the supported list of MediaControlDisplayMode.
Declaration
C#Copypublic static void SetDisplayModeCapabilities(IDictionary<MediaControlDisplayMode, MediaControlCapabilitySupport> capabilities)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<MediaControlDisplayMode, MediaControlCapabilitySupport> | capabilities | The supported list of MediaControlDisplayMode. |
Remarks
NotDecided is not allowed in display mode capability. The default value of each MediaControlDisplayMode is not supported.
API Level: 4
SetDisplayModeCapability(MediaControlDisplayMode, MediaControlCapabilitySupport)
Sets the mode
is supported or not.
Declaration
C#Copypublic static void SetDisplayModeCapability(MediaControlDisplayMode mode, MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlDisplayMode | mode | |
MediaControlCapabilitySupport | support | A value indicating whether the |
Remarks
NotDecided is not allowed in display mode capability.
The default value of each MediaControlDisplayMode is not supported.
API Level: 6
Declaration
C#Copypublic static void SetDisplayRotation(Rotation rotation)
Parameters
Type | Name | Description |
---|---|---|
Rotation | rotation | A value indicating the Rotation. |
API Level: 6
SetDisplayRotationCapabilities(IDictionary<Rotation, MediaControlCapabilitySupport>)
Sets the supported list of Rotation.
Declaration
C#Copypublic static void SetDisplayRotationCapabilities(IDictionary<Rotation, MediaControlCapabilitySupport> capabilities)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<Rotation, MediaControlCapabilitySupport> | capabilities | The supported list of Rotation. |
Remarks
NotDecided is not allowed in display rotation capability.
The default value of each Rotation is not supported.
API Level: 4
SetDisplayRotationCapability(Rotation, MediaControlCapabilitySupport)
Sets the rotation
is supported or not.
Declaration
C#Copypublic static void SetDisplayRotationCapability(Rotation rotation, MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
Rotation | rotation | The Rotation. |
MediaControlCapabilitySupport | support | A value indicating whether the |
Remarks
NotDecided is not allowed in display rotation capability.
The default value of each Rotation is not supported.
API Level: 6
Declaration
C#Copypublic static void SetIconPath(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of icon. |
API Level: 5
Declaration
C#Copypublic static void SetIndexOfCurrentPlayingMedia(string index)
Parameters
Type | Name | Description |
---|---|---|
String | index | The index of current playing media. |
API Level: 5
SetInfoOfCurrentPlayingMedia(String, String)
Sets the playlist name and index of current playing media.
Declaration
C#Copypublic static void SetInfoOfCurrentPlayingMedia(string playlistName, string index)
Parameters
Type | Name | Description |
---|---|---|
String | playlistName | The playlist name of current playing media. |
String | index | The index of current playing media. |
API Level: 5
Declaration
C#Copypublic static void SetMetadata(MediaControlMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
MediaControlMetadata | metadata | The metadata to update. |
API Level: 4
Declaration
C#Copypublic static void SetMode360(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isEnabled | A value indicating whether the 360 mode is enabled. |
API Level: 6
SetMode360Capability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating whether 360 mode is supported or not.
Declaration
C#Copypublic static void SetMode360Capability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the 360 mode is supported or not. |
API Level: 6
SetPlaybackCapabilities(Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport>)
Sets the capabilities by MediaControlPlaybackCommand.
Declaration
C#Copypublic static void SetPlaybackCapabilities(Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> capabilities)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> | capabilities | The set of MediaControlPlaybackCommand and MediaControlCapabilitySupport. |
API Level: 4
SetPlaybackCapability(MediaControlPlaybackCommand, MediaControlCapabilitySupport)
Sets the capabilities by MediaControlPlaybackCommand.
Declaration
C#Copypublic static void SetPlaybackCapability(MediaControlPlaybackCommand action, MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackCommand | action | A playback command. |
MediaControlCapabilitySupport | support | A value indicating whether the |
API Level: 5
SetPlaybackContentType(MediaControlContentType)
Sets the content type of latest played media.
Declaration
C#Copypublic static void SetPlaybackContentType(MediaControlContentType type)
Parameters
Type | Name | Description |
---|---|---|
MediaControlContentType | type | A value indicating the content type of the latest played media. |
API Level: 5
SetPlaybackPositionCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating playback position is supported or not.
Declaration
C#Copypublic static void SetPlaybackPositionCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the playback position is supported or not. |
API Level: 11
SetPlaybackState(MediaControlPlaybackState, Int64)
Updates playback state and playback position.
Declaration
C#Copypublic static void SetPlaybackState(MediaControlPlaybackState state, long position)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackState | state | The playback state. |
Int64 | position | The playback position in milliseconds. |
API Level: 4
SetPlaylistCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating playlist is supported or not.
Declaration
C#Copypublic static void SetPlaylistCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the playlist is supported or not. |
API Level: 11
Declaration
C#Copypublic static void SetRepeatMode(MediaControlRepeatMode mode)
Parameters
Type | Name | Description |
---|---|---|
MediaControlRepeatMode | mode | A value indicating the repeat mode. |
API Level: 4
SetRepeatModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating repeat mode is supported or not.
Declaration
C#Copypublic static void SetRepeatModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the MediaControlRepeatMode is supported or not. |
API Level: 5
SetSearchCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating search is supported or not.
Declaration
C#Copypublic static void SetSearchCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the search is supported or not. |
API Level: 11
SetShuffleModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating shuffle mode is supported or not.
Declaration
C#Copypublic static void SetShuffleModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the shuffle mode is supported or not. |
API Level: 5
Declaration
C#Copypublic static void SetShuffleModeEnabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enabled | A value indicating whether the shuffle mode is enabled. |
API Level: 4
Declaration
C#Copypublic static void SetSubtitleMode(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isEnabled | A value indicating whether the subtitle mode is enabled. |
API Level: 6
SetSubtitleModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating whether subtitle mode is supported or not.
Declaration
C#Copypublic static void SetSubtitleModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the subtitle mode is supported or not. |
API Level: 6
Declaration
C#Copypublic static void Start()
Remarks
When the server starts, ServerStarted will be raised.
See Also
API Level: 4
Privilege Level: public
Privilege: http://tizen.org/privilege/mediacontroller.server
Declaration
C#Copypublic static void Stop()
Remarks
When the server stops, ServerStopped will be raised.
See Also
API Level: 4
Events
Declaration
C#Copypublic static event EventHandler<CustomCommandReceivedEventArgs> CustomCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<CustomCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<DisplayModeCommandReceivedEventArgs> DisplayModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<DisplayModeCommandReceivedEventArgs> |
API Level: 6
Declaration
C#Copypublic static event EventHandler<DisplayRotationCommandReceivedEventArgs> DisplayRotationCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<DisplayRotationCommandReceivedEventArgs> |
API Level: 6
Declaration
C#Copypublic static event EventHandler<Mode360CommandReceivedEventArgs> Mode360CommandReceived
Event Type
Type | Description |
---|---|
EventHandler<Mode360CommandReceivedEventArgs> |
API Level: 6
Declaration
C#Copypublic static event EventHandler<PlaybackActionCommandReceivedEventArgs> PlaybackActionCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<PlaybackActionCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<PlaybackCommandReceivedEventArgs> PlaybackCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<PlaybackCommandReceivedEventArgs> |
API Level: 4
Declaration
C#Copypublic static event EventHandler<PlaybackPositionCommandReceivedEventArgs> PlaybackPositionCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<PlaybackPositionCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<PlaylistCommandReceivedEventArgs> PlaylistCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<PlaylistCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<RepeatModeCommandReceivedEventArgs> RepeatModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<RepeatModeCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<SearchCommandReceivedEventArgs> SearchCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<SearchCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<ShuffleModeCommandReceivedEventArgs> ShuffleModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<ShuffleModeCommandReceivedEventArgs> |
API Level: 5
Declaration
C#Copypublic static event EventHandler<SubtitleModeCommandReceivedEventArgs> SubtitleModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<SubtitleModeCommandReceivedEventArgs> |