Search Results for

    Show / Hide Table of Contents

    Class MediaPlayer

    MediaPlayer provieds the essential components to play the media contents.

    Inheritance
    System.Object
    Xamarin.Forms.BindableObject
    Xamarin.Forms.Element
    MediaPlayer
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Xamarin.Forms.IElementController
    Inherited Members
    Xamarin.Forms.Element.MenuProperty
    Xamarin.Forms.Element.AutomationIdProperty
    Xamarin.Forms.Element.ClassIdProperty
    Xamarin.Forms.Element.GetMenu(Xamarin.Forms.BindableObject)
    Xamarin.Forms.Element.SetMenu(Xamarin.Forms.BindableObject, Xamarin.Forms.Menu)
    Xamarin.Forms.Element.Xamarin.Forms.IElementController.SetValueFromRenderer(Xamarin.Forms.BindableProperty, System.Object)
    Xamarin.Forms.Element.FindByName(System.String)
    Xamarin.Forms.Element.RemoveDynamicResource(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.Element.SetDynamicResource(Xamarin.Forms.BindableProperty, System.String)
    Xamarin.Forms.Element.OnBindingContextChanged()
    Xamarin.Forms.Element.OnChildAdded(Xamarin.Forms.Element)
    Xamarin.Forms.Element.OnChildRemoved(Xamarin.Forms.Element)
    Xamarin.Forms.Element.OnChildRemoved(Xamarin.Forms.Element, System.Int32)
    Xamarin.Forms.Element.OnParentSet()
    Xamarin.Forms.Element.OnPropertyChanged(System.String)
    Xamarin.Forms.Element.AutomationId
    Xamarin.Forms.Element.ClassId
    Xamarin.Forms.Element.Effects
    Xamarin.Forms.Element.Id
    Xamarin.Forms.Element.StyleId
    Xamarin.Forms.Element.Parent
    Xamarin.Forms.Element.ChildAdded
    Xamarin.Forms.Element.ChildRemoved
    Xamarin.Forms.Element.DescendantAdded
    Xamarin.Forms.Element.DescendantRemoved
    Xamarin.Forms.BindableObject.BindingContextProperty
    Xamarin.Forms.BindableObject.ClearValue(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.BindableObject.ClearValue(Xamarin.Forms.BindablePropertyKey)
    Xamarin.Forms.BindableObject.GetValue(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.BindableObject.IsSet(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.BindableObject.RemoveBinding(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.BindableObject.SetBinding(Xamarin.Forms.BindableProperty, Xamarin.Forms.BindingBase)
    Xamarin.Forms.BindableObject.ApplyBindings()
    Xamarin.Forms.BindableObject.OnPropertyChanging(System.String)
    Xamarin.Forms.BindableObject.UnapplyBindings()
    Xamarin.Forms.BindableObject.SetValue(Xamarin.Forms.BindableProperty, System.Object)
    Xamarin.Forms.BindableObject.SetValue(Xamarin.Forms.BindablePropertyKey, System.Object)
    Xamarin.Forms.BindableObject.CoerceValue(Xamarin.Forms.BindableProperty)
    Xamarin.Forms.BindableObject.CoerceValue(Xamarin.Forms.BindablePropertyKey)
    Xamarin.Forms.BindableObject.Dispatcher
    Xamarin.Forms.BindableObject.BindingContext
    Xamarin.Forms.BindableObject.PropertyChanged
    Xamarin.Forms.BindableObject.PropertyChanging
    Xamarin.Forms.BindableObject.BindingContextChanged
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Tizen.Theme.Common
    Assembly: Tizen.Theme.Common.dll
    Syntax
    public class MediaPlayer : Element, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IStyleSelectable

    Constructors

    MediaPlayer()

    Initializes a new instance of the MediaPlayer class.

    Declaration
    public MediaPlayer()

    Fields

    AspectModeProperty

    Identifies the AspectMode bindable property.

    Declaration
    public static readonly BindableProperty AspectModeProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    AutoPlayProperty

    Identifies the AutoPlay bindable property.

    Declaration
    public static readonly BindableProperty AutoPlayProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    AutoStopProperty

    Identifies the AutoStop bindable property.

    Declaration
    public static readonly BindableProperty AutoStopProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    BufferingProgressProperty

    Identifies the BufferingProgress bindable property.

    Declaration
    public static readonly BindableProperty BufferingProgressProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    DurationProperty

    Identifies the Duration bindable property.

    Declaration
    public static readonly BindableProperty DurationProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    IsBufferingProperty

    Identifies the IsBuffering bindable property.

    Declaration
    public static readonly BindableProperty IsBufferingProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    IsLoopingProperty

    Identifies the IsLooping bindable property.

    Declaration
    public static readonly BindableProperty IsLoopingProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    IsMutedProperty

    Identifies the IsMuted bindable property.

    Declaration
    public static readonly BindableProperty IsMutedProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    PositionProperty

    Identifies the Position bindable property.

    Declaration
    public static readonly BindableProperty PositionProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    PositionUpdateIntervalProperty

    Identifies the PositionUpdateInterval bindable property.

    Declaration
    public static readonly BindableProperty PositionUpdateIntervalProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    SourceProperty

    Identifies the Source bindable property.

    Declaration
    public static readonly BindableProperty SourceProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    StateProperty

    Identifies the State bindable property.

    Declaration
    public static readonly BindableProperty StateProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    UsesEmbeddingControlsProperty

    Identifies the UsesEmbeddingControls bindable property.

    Declaration
    public static readonly BindableProperty UsesEmbeddingControlsProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    VideoOutputProperty

    Identifies the VideoOutput bindable property.

    Declaration
    public static readonly BindableProperty VideoOutputProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    VolumeProperty

    Identifies the Volume bindable property.

    Declaration
    public static readonly BindableProperty VolumeProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    Properties

    AspectMode

    Gets or sets the scaling mode for the media content.

    Declaration
    public DisplayAspectMode AspectMode { get; set; }
    Property Value
    Type Description
    DisplayAspectMode

    AutoPlay

    Gets or sets a value whether the media content plays automatically.

    Declaration
    public bool AutoPlay { get; set; }
    Property Value
    Type Description
    System.Boolean

    AutoStop

    Gets or sets a value whether the media content stops automatically.

    Declaration
    public bool AutoStop { get; set; }
    Property Value
    Type Description
    System.Boolean

    BufferingProgress

    Gets the value indicating the buffering percentage.

    Declaration
    public double BufferingProgress { get; }
    Property Value
    Type Description
    System.Double

    Duration

    Gets the duration of a media content.

    Declaration
    public int Duration { get; }
    Property Value
    Type Description
    System.Int32

    IsBuffering

    Gets a value indicating the buffering status.

    Declaration
    public bool IsBuffering { get; }
    Property Value
    Type Description
    System.Boolean

    IsLooping

    Gets or sets the value whether the volume is looping or not.

    Declaration
    public bool IsLooping { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsMuted

    Gets or sets the value whether the volume is muted.

    Declaration
    public bool IsMuted { get; set; }
    Property Value
    Type Description
    System.Boolean

    Position

    Gets the value of the current position of the media content.

    Declaration
    public int Position { get; }
    Property Value
    Type Description
    System.Int32

    PositionUpdateInterval

    Gets or sets the desired interval time for updating position.

    Declaration
    public int PositionUpdateInterval { get; set; }
    Property Value
    Type Description
    System.Int32

    Source

    Gets or sets the source of the media content.

    Declaration
    [TypeConverter(typeof(MediaSourceConverter))]
    public MediaSource Source { get; set; }
    Property Value
    Type Description
    MediaSource
    Remarks

    The "http://developer.samsung.com/privilege/drmplay"; privilege is required in case of DRMMediaSource.

    State

    Gets the current playback state.

    Declaration
    public PlaybackState State { get; }
    Property Value
    Type Description
    PlaybackState

    UsesEmbeddingControls

    Gets or sets whether to use the embedding controls.

    Declaration
    public bool UsesEmbeddingControls { get; set; }
    Property Value
    Type Description
    System.Boolean

    VideoOutput

    Gets or sets the video output.

    Declaration
    public IVideoOutput VideoOutput { get; set; }
    Property Value
    Type Description
    IVideoOutput

    Volume

    Gets or sets the current volume of a media content.

    Declaration
    public double Volume { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    CreateMediaPlayerImpl()

    Declaration
    protected virtual IPlatformMediaPlayer CreateMediaPlayerImpl()
    Returns
    Type Description
    IPlatformMediaPlayer

    GetAlbumArts()

    Retrieves the album art of the stream, or null if there is no album art data.

    Declaration
    public Task<Stream> GetAlbumArts()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.IO.Stream>

    Returns a Task that gets the album art of the stream

    GetMetadata()

    Gets the metadata of the media content.

    Declaration
    public Task<IDictionary<string, string>> GetMetadata()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<System.String, System.String>>

    Returns a Task that has the metadata of the media content.

    Pause()

    Pauses the player.

    Declaration
    public void Pause()

    Seek(Int32)

    Attemps to seek the playback position.

    Declaration
    public Task<int> Seek(int ms)
    Parameters
    Type Name Description
    System.Int32 ms

    The milliseconds to seek

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>

    Returns a Task that seeks the play position.

    Start()

    Starts or resumes playback.

    Declaration
    public Task<bool> Start()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Returns a Task that prepares the player and play the media content.

    Remarks

    The "http://developer.samsung.com/privilege/drmplay"; privilege is required if you want to start DRM-pretected content playback.

    Stop()

    Stops playing the media content.

    Declaration
    public void Stop()

    Events

    BufferingCompleted

    Occurs when the buffering for the media content is completed.

    Declaration
    public event EventHandler BufferingCompleted
    Event Type
    Type Description
    System.EventHandler

    BufferingStarted

    Occurs when the buffering for the media content is started.

    Declaration
    public event EventHandler BufferingStarted
    Event Type
    Type Description
    System.EventHandler

    PlaybackCompleted

    Occurs when the playback is completed.

    Declaration
    public event EventHandler PlaybackCompleted
    Event Type
    Type Description
    System.EventHandler

    PlaybackPaused

    Occurs when the playback is paused.

    Declaration
    public event EventHandler PlaybackPaused
    Event Type
    Type Description
    System.EventHandler

    PlaybackStarted

    Occurs when the playback is started.

    Declaration
    public event EventHandler PlaybackStarted
    Event Type
    Type Description
    System.EventHandler

    PlaybackStopped

    Occurs when the playback is stopped.

    Declaration
    public event EventHandler PlaybackStopped
    Event Type
    Type Description
    System.EventHandler

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Xamarin.Forms.IElementController
    In This Article
    Back to top Copyright © 2018-2019 Samsung
    Generated by DocFX