播放单首歌曲
添加多首歌曲到播放列表
foreach (DataRow drItem in MusicSettings.DtMusic.Rows)
{
media = player.newMedia(drItem["路径"].ToString()); //参数为歌曲路径
playList.appendItem(media);
}
player.currentPlaylist = playList;
player.Ctlcontrols.play(); //开始播放
或者直接在当前列表上添加
IWMPMedia media;
foreach (DataRow drItem in MusicSettings.DtMusic.Rows)
{
media = player.newMedia(drItem["路径"].ToString()); //参数为歌曲路径
player.currentPlaylist.appendItem(media);
}
新闻热点
疑难解答