0
我嘗試製作簡單的音頻播放器,然後我嘗試使用 。 歌曲結束後,播放器停止播放。AxWMPLib.AxWindowsMediaPlayer歌曲結束後自動播放
我想自動設置它並在播放列表中選擇隨機化。 我使用的網址和一個列表框的播放列表..
這是自動播放的部分代碼片段:
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (e.newState == 8)
{
Random rnd = new Random();
int nowPlayIndex = rnd.Next(listURLPlayers.Count);
axWindowsMediaPlayer1.URL = listURLPlayers[nowPlayIndex];
axWindowsMediaPlayer1.Ctlenabled = true;
axWindowsMediaPlayer1.Ctlcontrols.play();
listAudio.SelectedIndex = nowPlayIndex;
}
}
但我嘗試它,然後在URL改變,但不自動播放。
我的代碼有什麼問題?
https://github.com/mudzakkir/MP3Player.git
請幫忙。
你在哪裏decare您TIMER1 VAR /類型? – kcho0
當然內置在.designer文件中 – toha