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
    object
    MediaControlServer

    Properties

    View Source

    IsRunning

    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
    Start()
    Stop()

    Methods

    View Source

    SetMetadata(MediaControlMetadata)

    Updates metadata information.

    Declaration
    public static void SetMetadata(MediaControlMetadata metadata)
    Parameters
    Type Name Description
    MediaControlMetadata metadata

    The metadata to update.

    Exceptions
    Type Condition
    System.ArgumentNullException

    metadata is null.

    System.InvalidOperationException

    The server is not running .
    -or-
    An internal error occurs.

    See Also
    MediaControllerManager
    MediaController
    View Source

    SetPlaybackState(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.

    Exceptions
    Type Condition
    System.ArgumentException

    state is not valid.

    System.ArgumentOutOfRangeException

    position is less than zero.

    System.InvalidOperationException

    The server is not running .
    -or-
    An internal error occurs.

    See Also
    MediaControllerManager
    MediaController
    View Source

    SetRepeatMode(MediaControlRepeatMode)

    Updates the repeat mode.

    Declaration
    public static void SetRepeatMode(MediaControlRepeatMode mode)
    Parameters
    Type Name Description
    MediaControlRepeatMode mode

    A value indicating the repeat mode.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The server is not running .
    -or-
    An internal error occurs.

    System.ArgumentException

    mode is invalid.

    See Also
    MediaControllerManager
    MediaController
    View Source

    SetShuffleModeEnabled(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.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The server is not running .
    -or-
    An internal error occurs.

    See Also
    MediaControllerManager
    MediaController
    View Source

    Start()

    Starts the media control server.

    Declaration
    public static void Start()
    Remarks

    When the server starts, ServerStarted will be raised.

    Exceptions
    Type Condition
    System.InvalidOperationException

    An internal error occurs.

    System.UnauthorizedAccessException

    Caller does not have required privilege.

    See Also
    ServerStarted
    View Source

    Stop()

    Stops the media control server.

    Declaration
    public static void Stop()
    Remarks

    When the server stops, ServerStopped will be raised.

    Exceptions
    Type Condition
    System.InvalidOperationException

    The server is not running .
    -or-
    An internal error occurs.

    See Also
    ServerStopped

    Events

    View Source

    PlaybackCommandReceived

    Occurs when a client sends playback command.

    Declaration
    public static event EventHandler<PlaybackCommandReceivedEventArgs> PlaybackCommandReceived
    Event Type
    Type Description
    System.EventHandler<TEventArgs><PlaybackCommandReceivedEventArgs>
    See Also
    MediaControllerManager
    MediaController

    See Also

    MediaControllerManager
    MediaController
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX