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

属性值

媒体播放的当前状态。

属性

适用于