Share via


MediaPlayer.CurrentState 屬性

定義

取得媒體播放的目前狀態。

注意

MediaPlayer.CurrentState可能會在 Windows 10 1607 版之後變更或無法使用。 請改用 MediaPlayer.PlaybackSession 屬性來取得 MediaPlaybackSession 物件,然後使用 MediaPlaybackSession.PlaybackState 屬性。

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

屬性值

媒體播放的目前狀態。

屬性

適用於