Page 1 of 1

Change looping setting on the fly

Posted: 04 Nov 2008 18:53
by tony72
I'm sure this is easy, but have searched a lot and can't find the answer (this post looked promising, but it looks like something went wrong with the post, as the bit with the answer at the end is tantalisingly missing :( : https://forum.videolan.org/viewtopic.ph ... ng#p110926). I'm using the VLC ActiveX control, and I need to be able to change between looping and non-looping playback after the control has been created. The AutoLoop property only sets the initial state, after that, changing it does nothing. I can't see a suitable property on the playlist object or whatever. Surely there's a simple way to do this, please can someone fill me in?

Re: Change looping setting on the fly

Posted: 05 Nov 2008 12:44
by Chuen
What VLC version are you using?

Re: Change looping setting on the fly

Posted: 05 Nov 2008 13:32
by tony72
Sorry, I should have included that information. I'm currently using 0.8.6i, and also experimenting with 0.9.4, although I will probably be sticking with 0.8.6i for a while.

Re: Change looping setting on the fly

Posted: 10 Nov 2008 14:37
by Chuen
If you are using 086 then you can use this sequence to accomplish that.
1. Save the mrl locally
2. Check using a timer

Code: Select all

if (vlc.Playing == false) and (bLoop == true) { vlc.playlistClear; vlc.addTarget(mrl, null, VLCPlayListReplace, 0); vlc.Play; }

Re: Change looping setting on the fly

Posted: 10 Nov 2008 14:50
by tony72
Thanks for the suggestion Chuen. However that's what I'm already doing (using a thread rather than a timer). I consider that a kludge, as you can't avoid seeing a brief white rectangle displayed between end and restarting of playback, whereas when AutoLoop is on, it's seamless. I guess I will have to live with that, but it seems very strange to me if there isn't a proper way of doing this :? .

Re: Change looping setting on the fly

Posted: 10 Nov 2008 15:17
by Chuen
Yeah, VLC ActiveX lacks lots of functionalities compared to the VlcLib.
Because of that I'm also switching over.