I am hoping someone can help me, i want to play another video file, however when i double click another video file it doesnt play it and just shows the last frame from the first video file. i am not sure what i am doing wrong.
below is my code
void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
string final = "file path";
playfile(final);
}
void playfile(string final)
{
var control = new VlcControl();
var currentAssembly = Assembly.GetEntryAssembly();
var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName;
// Default installation path of VideoLAN.LibVLC.Windows
var libDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
control.BeginInit();
control.VlcLibDirectory = libDirectory;
control.Dock = DockStyle.Fill;
control.EndInit();
panel1.Controls.Add(control);
control.ResetMedia();
control.Play(new Uri(final).AbsoluteUri);
}
i have tried things like
control.Dispose();
control.ResetMedia();
control.Update();
control.Refresh();
i have even tried to manipulate the panel however that didnt work
Thank you