MediaPlayer.CurrentState Property

Definition

Gets the current state of media playback.

Note

MediaPlayer.CurrentState may be altered or unavailable after Windows 10, version 1607. Instead, use the MediaPlayer.PlaybackSession property to get a MediaPlaybackSession object and then use the MediaPlaybackSession.PlaybackState property.

public:
 property MediaPlayerState CurrentState { MediaPlayerState get(); };
MediaPlayerState CurrentState();
/// [get: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.State instead of CurrentState.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
MediaPlayerState CurrentState();
public MediaPlayerState CurrentState { get; }
public MediaPlayerState CurrentState { [Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.State instead of CurrentState.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")] get; }
var mediaPlayerState = mediaPlayer.currentState;
Public ReadOnly Property CurrentState As MediaPlayerState

Property Value

The current state of media playback.

Attributes

Applies to