Class MediaControlServer
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
Provides a means to set playback information and metadata and receive commands from clients.
public static class MediaControlServer
- Inheritance
-
objectMediaControlServer
Properties
View SourceIsRunning
Gets a value indicating whether the server is running.
Declaration
public static bool IsRunning { get; }
Property Value
Type | Description |
---|---|
bool | true if the server has started; otherwise, false. |
See Also
Methods
View SourceGetActivatedClients()
Gets the active clients.
Declaration
public static IEnumerable<string> GetActivatedClients()
Returns
Type | Description |
---|---|
IEnumerable<><string> | the activated client ids. |
See Also
View SourceRemovePlaylist(MediaControlPlaylist)
Delete playlist.
Declaration
public static void RemovePlaylist(MediaControlPlaylist playlist)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaylist | playlist | The name of playlist. |
Remarks
Currently, only server can remove the playlist.
See Also
View SourceRequestAsync(Command, string)
Requests commands to the client.
Declaration
public 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
View SourceRequestCommandAsync(Command, string)
Requests a command to the client and server receives the result of each request(command).
Declaration
public 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<><(Bundle bundle, int result)> | The type of return value is Tuple. |
See Also
View SourceResponse(Command, int, Bundle)
Sends the result of each command.
Declaration
public static 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. |
See Also
View SourceResponse(Command, int)
Sends the result of each command.
Declaration
public static void Response(Command command, int result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
int | result | The result of |
See Also
View SourceResponse(Command, MediaControlResult, Bundle)
Sends the result of each command.
Declaration
public 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. |
See Also
View SourceResponse(Command, MediaControlResult)
Sends the result of each command.
Declaration
public static void Response(Command command, MediaControlResult result)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command that return to client. |
MediaControlResult | result | The MediaControlResult of |
See Also
View SourceSetAgeRating(int)
Sets the age rating of latest played media.
Declaration
public static void SetAgeRating(int ageRating)
Parameters
Type | Name | Description |
---|---|---|
int | 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. |
See Also
View SourceSetCustomCommandCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating custom command is supported or not.
Declaration
public static void SetCustomCommandCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the custom command is supported or not. |
See Also
View SourceSetDisplayMode(MediaControlDisplayMode)
Sets the display mode.
Declaration
public static void SetDisplayMode(MediaControlDisplayMode mode)
Parameters
Type | Name | Description |
---|---|---|
MediaControlDisplayMode | mode | A value indicating the MediaControlDisplayMode. |
See Also
View SourceSetDisplayModeCapabilities(IDictionary<MediaControlDisplayMode, MediaControlCapabilitySupport>)
Sets the supported list of MediaControlDisplayMode.
Declaration
public 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.
See Also
View SourceSetDisplayModeCapability(MediaControlDisplayMode, MediaControlCapabilitySupport)
Sets the mode
is supported or not.
Declaration
public 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.
See Also
View SourceSetDisplayRotation(Rotation)
Sets the display rotation.
Declaration
public static void SetDisplayRotation(Rotation rotation)
Parameters
Type | Name | Description |
---|---|---|
Rotation | rotation | A value indicating the Rotation. |
See Also
View SourceSetDisplayRotationCapabilities(IDictionary<Rotation, MediaControlCapabilitySupport>)
Sets the supported list of Rotation.
Declaration
public 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.
See Also
View SourceSetDisplayRotationCapability(Rotation, MediaControlCapabilitySupport)
Sets the rotation
is supported or not.
Declaration
public 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.
See Also
View SourceSetIconPath(string)
Sets the path of icon.
Declaration
public static void SetIconPath(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path of icon. |
See Also
View SourceSetInfoOfCurrentPlayingMedia(string, string)
Sets the playlist name and index of current playing media.
Declaration
public 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. |
See Also
View SourceSetMetadata(MediaControlMetadata)
Updates metadata information.
Declaration
public static void SetMetadata(MediaControlMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
MediaControlMetadata | metadata | The metadata to update. |
See Also
View SourceSetMode360(bool)
Sets the 360 mode.
Declaration
public static void SetMode360(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
bool | isEnabled | A value indicating whether the 360 mode is enabled. |
See Also
View SourceSetMode360Capability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating whether 360 mode is supported or not.
Declaration
public static void SetMode360Capability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the 360 mode is supported or not. |
See Also
View SourceSetPlaybackCapabilities(Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport>)
Sets the capabilities by MediaControlPlaybackCommand.
Declaration
public static void SetPlaybackCapabilities(Dictionary<MediaControlPlaybackCommand, MediaControlCapabilitySupport> capabilities)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<, ><MediaControlPlaybackCommand, MediaControlCapabilitySupport> | capabilities | The set of MediaControlPlaybackCommand and MediaControlCapabilitySupport. |
See Also
View SourceSetPlaybackCapability(MediaControlPlaybackCommand, MediaControlCapabilitySupport)
Sets the capabilities by MediaControlPlaybackCommand.
Declaration
public static void SetPlaybackCapability(MediaControlPlaybackCommand action, MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackCommand | action | A playback command. |
MediaControlCapabilitySupport | support | A value indicating whether the |
See Also
View SourceSetPlaybackContentType(MediaControlContentType)
Sets the content type of latest played media.
Declaration
public static void SetPlaybackContentType(MediaControlContentType type)
Parameters
Type | Name | Description |
---|---|---|
MediaControlContentType | type | A value indicating the content type of the latest played media. |
See Also
View SourceSetPlaybackPositionCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating playback position is supported or not.
Declaration
public static void SetPlaybackPositionCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the playback position is supported or not. |
See Also
View SourceSetPlaybackState(MediaControlPlaybackState, long)
Updates playback state and playback position.
Declaration
public static void SetPlaybackState(MediaControlPlaybackState state, long position)
Parameters
Type | Name | Description |
---|---|---|
MediaControlPlaybackState | state | The playback state. |
long | position | The playback position in milliseconds. |
See Also
View SourceSetPlaylistCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating playlist is supported or not.
Declaration
public static void SetPlaylistCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the playlist is supported or not. |
See Also
View SourceSetRepeatMode(MediaControlRepeatMode)
Updates the repeat mode.
Declaration
public static void SetRepeatMode(MediaControlRepeatMode mode)
Parameters
Type | Name | Description |
---|---|---|
MediaControlRepeatMode | mode | A value indicating the repeat mode. |
See Also
View SourceSetRepeatModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating repeat mode is supported or not.
Declaration
public static void SetRepeatModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the MediaControlRepeatMode is supported or not. |
See Also
View SourceSetSearchCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating search is supported or not.
Declaration
public static void SetSearchCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the search is supported or not. |
See Also
View SourceSetShuffleModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating shuffle mode is supported or not.
Declaration
public static void SetShuffleModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the shuffle mode is supported or not. |
See Also
View SourceSetShuffleModeEnabled(bool)
Updates the shuffle mode.
Declaration
public static void SetShuffleModeEnabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
bool | enabled | A value indicating whether the shuffle mode is enabled. |
See Also
View SourceSetSubtitleMode(bool)
Sets the subtitle mode.
Declaration
public static void SetSubtitleMode(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
bool | isEnabled | A value indicating whether the subtitle mode is enabled. |
See Also
View SourceSetSubtitleModeCapability(MediaControlCapabilitySupport)
Sets the MediaControlCapabilitySupport indicating whether subtitle mode is supported or not.
Declaration
public static void SetSubtitleModeCapability(MediaControlCapabilitySupport support)
Parameters
Type | Name | Description |
---|---|---|
MediaControlCapabilitySupport | support | A value indicating whether the subtitle mode is supported or not. |
See Also
View SourceStart()
Starts the media control server.
Declaration
public static void Start()
Remarks
When the server starts, ServerStarted will be raised.
See Also
View SourceStop()
Stops the media control server.
Declaration
public static void Stop()
Remarks
When the server stops, ServerStopped will be raised.
See Also
Events
View SourceCustomCommandReceived
Occurs when a client sends custom command.
Declaration
public static event EventHandler<CustomCommandReceivedEventArgs> CustomCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><CustomCommandReceivedEventArgs> |
See Also
View SourceDisplayModeCommandReceived
Occurs when a client sends display mode command.
Declaration
public static event EventHandler<DisplayModeCommandReceivedEventArgs> DisplayModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><DisplayModeCommandReceivedEventArgs> |
See Also
View SourceDisplayRotationCommandReceived
Occurs when a client sends display rotation command.
Declaration
public static event EventHandler<DisplayRotationCommandReceivedEventArgs> DisplayRotationCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><DisplayRotationCommandReceivedEventArgs> |
See Also
View SourceMode360CommandReceived
Occurs when a client sends mode 360 command.
Declaration
public static event EventHandler<Mode360CommandReceivedEventArgs> Mode360CommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><Mode360CommandReceivedEventArgs> |
See Also
View SourcePlaybackActionCommandReceived
Occurs when a client sends playback command.
Declaration
public static event EventHandler<PlaybackActionCommandReceivedEventArgs> PlaybackActionCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><PlaybackActionCommandReceivedEventArgs> |
See Also
View SourcePlaybackCommandReceived
Occurs when a client sends playback command.
Declaration
public static event EventHandler<PlaybackCommandReceivedEventArgs> PlaybackCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><PlaybackCommandReceivedEventArgs> |
See Also
View SourcePlaybackPositionCommandReceived
Occurs when a client sends playback position command.
Declaration
public static event EventHandler<PlaybackPositionCommandReceivedEventArgs> PlaybackPositionCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><PlaybackPositionCommandReceivedEventArgs> |
See Also
View SourcePlaylistCommandReceived
Occurs when a client sends playlist command.
Declaration
public static event EventHandler<PlaylistCommandReceivedEventArgs> PlaylistCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><PlaylistCommandReceivedEventArgs> |
See Also
View SourceRepeatModeCommandReceived
Occurs when a client sends repeat mode command.
Declaration
public static event EventHandler<RepeatModeCommandReceivedEventArgs> RepeatModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><RepeatModeCommandReceivedEventArgs> |
See Also
View SourceSearchCommandReceived
Occurs when a client sends search command.
Declaration
public static event EventHandler<SearchCommandReceivedEventArgs> SearchCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><SearchCommandReceivedEventArgs> |
See Also
View SourceShuffleModeCommandReceived
Occurs when a client sends shuffle mode command.
Declaration
public static event EventHandler<ShuffleModeCommandReceivedEventArgs> ShuffleModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><ShuffleModeCommandReceivedEventArgs> |
See Also
View SourceSubtitleModeCommandReceived
Occurs when a client sends subtitle mode command.
Declaration
public static event EventHandler<SubtitleModeCommandReceivedEventArgs> SubtitleModeCommandReceived
Event Type
Type | Description |
---|---|
EventHandler<><SubtitleModeCommandReceivedEventArgs> |