I have installed VLCPlugin2 into a form in Delphi as an ActiveX. I can open a file and show it on the screen with no apparent problems.
VLC1.playlist.add(memOrigFile.Text, 'x1','play-and-stop');
VLC1.playlist.play;
The problem occurs when I then use the same code to choose a different file to load.
VLC1.playlist.add(memOrigFile.Text, 'x1','play-and-stop');
VLC1.playlist.next;
VLC1.playlist.play;
On the second run through, after running the .next command, the screen goes blank and it freezes. (Occurs regardless of if the second file is the same as the first or not).
I have tried putting the following code in front of the above code, but it doesn't help.
If VLc1.playlist.itemCount > 0 then
if VLC1.playlist.isPlaying then
VLC1.playlist.stop;
The following set of code was then tried.
VLC1.playlist.clear;
VLC1.playlist.add(memOrigFile.Text, 'x1','play-and-stop');
VLC1.playlist.play;
This code ran all the way through. However the screen was still showing the final still from the first video, and it again froze.
I then put a button on the form with the following code.
VLC1.input.position := 0.01;
VLC1.playlist.stop;
VLC1.playlist.play;
After running through one video I pressed the button. After the stop line was run (but before play) the screen went black and it froze.
It appears that there is some problem refreshing the playlist. Any thoughts welcome.