问题
when first video ended switch to second video program stop working:
private void axVLCPlugin21_MediaPlayerEndReached(object sender, EventArgs e)
{
if (listBox1.SelectedIndex < (listBox1.Items.Count - 1))
{
axVLCPlugin21.playlist.next();
listBox1.SelectedIndex += 1;
listBox1.Update();
}
else
{
axVLCPlugin21.playlist.playItem(0);
listBox1.SelectedIndex = 0;
listBox1.Update();
}
}
回答1:
private void axVLCPlugin21_MediaPlayerEndReached(object sender, EventArgs e)
{
if (listBox1.SelectedIndex < (listBox1.Items.Count - 1))
{
axVLCPlugin21.playlist.stop();
axVLCPlugin21.playlist.next();
listBox1.SelectedIndex += 1;
listBox1.Update();
}
else
{
axVLCPlugin21.playlist.stop();
axVLCPlugin21.playlist.playItem(0);
listBox1.SelectedIndex = 0;
listBox1.Update();
}
}
来源:https://stackoverflow.com/questions/28124041/c-sharp-vlc-playlist-autoplay-it-working-stop-when-next-video