AxWindowsMediaPlayer.playState 속성

[이 페이지와 연결된 기능인 Windows 미디어 플레이어 SDK는 레거시 기능입니다. MediaPlayer로 대체되었습니다. MediaPlayer는 Windows 10 및 Windows 11 최적화되었습니다. 가능한 경우 새 코드에서 Windows 미디어 플레이어 SDK 대신 MediaPlayer를 사용하는 것이 좋습니다. 가능한 경우 레거시 API를 사용하는 기존 코드를 다시 작성하여 새 API를 사용하도록 제안합니다.]

playState 속성은 Windows 미디어 플레이어 작업의 상태를 나타내는 열거형 값을 가져옵니다.

이 속성은 읽기 전용입니다.

구문

public WMPPlayState playState {get;}

Public ReadOnly Property playState As WMPPlayState

속성 값

WMPLib.WMPPlayState 열거형 값입니다.

설명

Windows 미디어 플레이어 상태는 특정 순서로 발생하도록 보장되지 않습니다. 또한 이벤트 시퀀스 중에 모든 상태가 반드시 발생하는 것은 아닙니다. 상태 순서를 사용하는 코드를 작성해서는 안 됩니다.

예제

다음 예제에서는 playState 속성을 사용하여 플레이어의 현재 재생 상태 레이블에 표시합니다. AxWMPLib.AxWindowsMediaPlayer 개체는 player라는 변수로 표시됩니다.

// Test whether Windows Media Player is in the playing state. 
if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
{
    playStateLabel.Text = "Windows Media Player is playing!";
}
else
{
    playStateLabel.Text = "Windows Media Player is NOT playing!";
}

' Test whether Windows Media Player is in the playing state. 
If (player.playState = WMPLib.WMPPlayState.wmppsPlaying) Then

    playStateLabel.Text = "Windows Media Player is playing!"

Else

    playStateLabel.Text = "Windows Media Player is NOT playing!"

End If

요구 사항

요구 사항
버전
Windows 미디어 플레이어 9 시리즈 이상
네임스페이스
AxWMPLib
어셈블리
AxInterop.WMPLib.dll(AxInterop.WMPLib.dll.dll)

추가 정보

AxWindowsMediaPlayer 개체(VB 및 C#)

AxWindowsMediaPlayer.PlayStateChange 이벤트(VB 및 C#)

WMPPlayState