Share via


AxWindowsMediaPlayer.currentPlaylist 속성

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

currentPlaylist 속성은 목록에서 미디어 항목을 쉽게 구성하고 조작할 수 있는 현재 IWMPPlaylist 인터페이스를 가져오거나 설정합니다.

구문

public IWMPPlaylist currentPlaylist {get; set;}

Public Property currentPlaylist As IWMPPlaylist

속성 값

현재 재생 목록에 대한 액세스를 제공하는 WMPLib.IWMPPlaylist 인터페이스입니다.

설명

IWMPSettings.autoStart 속성인 경우(AxWindowsMediaPlayer.settings를 통해 액세스합니다.autoStart)은 true이고, currentPlaylist를 설정할 때마다 재생이 자동으로 시작됩니다.

이 속성은 IWMPPlaylistArray에서 값을 가져오는 등 여러 가지 방법으로 가져올 수 있는 IWMPPlaylist 인터페이스를 사용합니다. 항목 또는 IWMPPlaylistCollection. newPlaylist 속성. 파일 이름을 사용하여 재생 목록 항목을 로드하려면 URL 속성을 설정하거나 AxWindowsMediaPlayer를 사용합니다. newPlaylist.

예제

다음 예제에서는 라이브러리의 첫 번째 재생 목록을 검색하고 currentPlaylist 속성을 사용하여 검색된 재생 목록을 현재 재생 목록으로 설정하고 해당 이름을 표시합니다. AxWMPLib.AxWindowsMediaPlayer 개체는 player라는 변수로 표시됩니다.

// Get an interface to the first playlist from the library. 
WMPLib.IWMPPlaylist firstPlaylist = player.playlistCollection.getAll().Item(0);

// Make the retrieved playlist the current playlist.
player.currentPlaylist = firstPlaylist;

// Display the name of the current playlist.
currentPlaylistLabel.Text = ("Found first playlist. Name = " + player.currentPlaylist.name);

' Get an interface to the first playlist from the library. 
Dim firstPlaylist As WMPLib.IWMPPlaylist = player.playlistCollection.getAll().Item(0)

' Make the retrieved playlist the current playlist.
player.currentPlaylist = firstPlaylist

' Display the name of the current playlist.
currentPlaylistLabel.Text = ("Found first playlist. Name = " + player.currentPlaylist.name)

요구 사항

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

추가 정보

AxWindowsMediaPlayer 개체(VB 및 C#)

AxWindowsMediaPlayer.newPlaylist(VB 및 C#)

AxWindowsMediaPlayer.settings(VB 및 C#)

IWMPPlaylist 인터페이스(VB 및 C#)

IWMPPlaylistArray.Item(VB 및 C#)

IWMPPlaylistCollection.newPlaylist(VB 및 C#)

IWMPSettings.autoStart(VB 및 C#)