C# VLC playlist autoplay it working stop when next video(C#VLC播放列表自动播放下一个视频时停止工作)
本文介绍了C#VLC播放列表自动播放下一个视频时停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
第一个视频结束时,切换到第二个视频节目停止工作:
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();
}
}
推荐答案
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();
}
}
这篇关于C#VLC播放列表自动播放下一个视频时停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!