Change looping setting on the fly

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tony72
New Cone
New Cone
Posts: 4
Joined: 29 May 2008 14:03

Change looping setting on the fly

Postby tony72 » 04 Nov 2008 18:53

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?

Chuen
Blank Cone
Blank Cone
Posts: 49
Joined: 19 Sep 2008 04:40
Contact:

Re: Change looping setting on the fly

Postby Chuen » 05 Nov 2008 12:44

What VLC version are you using?
Regards
Chuen

tony72
New Cone
New Cone
Posts: 4
Joined: 29 May 2008 14:03

Re: Change looping setting on the fly

Postby tony72 » 05 Nov 2008 13:32

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.

Chuen
Blank Cone
Blank Cone
Posts: 49
Joined: 19 Sep 2008 04:40
Contact:

Re: Change looping setting on the fly

Postby Chuen » 10 Nov 2008 14:37

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; }
Regards
Chuen

tony72
New Cone
New Cone
Posts: 4
Joined: 29 May 2008 14:03

Re: Change looping setting on the fly

Postby tony72 » 10 Nov 2008 14:50

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 :? .

Chuen
Blank Cone
Blank Cone
Posts: 49
Joined: 19 Sep 2008 04:40
Contact:

Re: Change looping setting on the fly

Postby Chuen » 10 Nov 2008 15:17

Yeah, VLC ActiveX lacks lots of functionalities compared to the VlcLib.
Because of that I'm also switching over.
Regards
Chuen


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 17 guests