Closed kingeaglewang closed 7 years ago
Did you have tried the Github version of Meta.Vlc. I have do many changes to make switch video work fine.
I will update the Nuget in this month.
Yes, I try the github version. You need to switch video very quickly. If you use load function to switch video, it is too slow. So, I create a button, when I click the button, it will switch to next video.
If I click the button very quickly, the program will get stuck.
I have the same issue. I have some online video files. When I download them and play them from local disk, at the first time it plays but when I repeat it or I try play it later (after playing another video) it doesn't have video and it only plays audio. I used this code:
VideoControl.Stop(); VideoControl.RebuildPlayer(); VideoControl.LoadMedia(url); VideoControl.Play();
If I set 'url' as something like "http://ip:port/.../video.mp4" it works perfect every time I play but when I use @"D:...\video.mp4" it works at first time but not in next plays.
@mahdi-ataollahi RebuildPlayer api is not recommend, most of the time you shouldn't call it
VlcPlayer media control api is not sync, maybe you can show user a loading animation to load a new meida, then you can wait player to be ready to load a new media
Hi, I use the code from the git. After user loads a video, I want to let user click next button to simply switch to next video in the same folder.
I create a next button, and it can show next video. The click function of next button is like following.
private void NextButton_Click(object sender, RoutedEventArgs e) { if (nowIndex == maxVideoNumber) nowIndex = 0; else nowIndex++; Player.Stop(); Player.LoadMedia(FileName[nowIndex]); Player.Play(); }
If I click the next button very quickly, one of the two problems will occur.
If I click pause in Visual studio, It stops at the following function. public void Stop() { _stopFunction.Delegate(InstancePointer); }
Is any idea about these problems ? Thanks
p.s: I try on the real VLC player. If I click next video very quickly, it won't get stuck.