如何使用C#在axVLCPlugin21中重新加载视频,我的代码只工作一次,并且只打开一个视频,尽管我的代码打开了另一个视频:
private void panel2Open_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog()==DialogResult.OK)
{
axVLCPlugin21.playlist.add(openFileDialog1.FileName);
axVLCPlugin21.playlist.play();
axVLCPlugin21.playlist.items.clear();
}
}
最佳答案
即使我通过获取Datagridview的视频链接来使用它,对我来说也很好用:
string videoSource=dataGridView1.Rows[e.RowIndex].Cells["Link"].Value.ToString();
axVLCPlugin21.playlist.add(videoSource, "video", " ");
axVLCPlugin21.playlist.next();
axVLCPlugin21.playlist.play();