Playlist item BUG?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
crypticman
New Cone
New Cone
Posts: 9
Joined: 20 Feb 2008 19:24

Playlist item BUG?

Postby crypticman » 22 Apr 2008 19:29

Hello,

I embedded vlc player on my web page, and loaded the playlist from my code and autoloop the playlist. It all works fine.
The issue is that when I tried to clear the playlist and add the new items and play again, the old items from the playlist are also played. here is the general code :

Code: Select all

vlc.playlist.add(item1); vlc.playlist.play(); //play item1 (works fine) //clear the list and play again vlc.playlist.items.clear(); //the doc says vlc.playlist.clear() is deprecated*** vlc.playlist.add(item2); vlc.playlist.play(); //play item1 and item2 (why item1 is still played?)

I checked the log message and i saw the message adding and deleting items from the playlist but still trying to play the old items.

any help would be appreciated. Thanks in advanced.

crypticman
New Cone
New Cone
Posts: 9
Joined: 20 Feb 2008 19:24

Re: Playlist item BUG?

Postby crypticman » 23 Apr 2008 14:55

anyone had that issue?

genew
New Cone
New Cone
Posts: 1
Joined: 25 Apr 2008 20:15

Re: Playlist item BUG?

Postby genew » 25 Apr 2008 20:23

I'm having similar difficulties. I get different behavior when I use different files/streams. Sometimes the first file plays and then just sits there. Other times, after a very long delay will play the first item in the playlist again and then advance to the second file!

Could you share how you're observing the messages? Are you doing this in javascript or monitoring in some other way?

Thanks!
Gene

crypticman
New Cone
New Cone
Posts: 9
Joined: 20 Feb 2008 19:24

Re: Playlist item BUG?

Postby crypticman » 25 Apr 2008 22:49

here is how i listen to log messages.
you can do it in javascript if you have your vlc embedded on your web page; here is how i monitor the log messages;

Code: Select all

//u need to have <div id=log></div> on your web page to display log function monitorLog() { var player = util.getVLC('vlc');// basically same as getElementById('vlc') player.log.verbosity = 0; var logMessages = player.log.messages; var i = logMessages.iterator(); var mediaName; var log = document.getElementById("log");// the html <div> , where you want to print out the log messages while(i.hasNext) { var msg = i.next(); displayVLCLog(msg,log); } player.log.messages.clear(); setTimeout('monitorLog',1500); } function displayVLCLog(msg,log) { if(msg.type=="playlist" || msg.type=="input")// filter out other unnessary log messages, i m only interested in playlist and items log.innerHTML += "<br>"+"message type="+msg.type+" --- message =" +msg.message; }
just modify according to your need. at least you have general idea how i am doing it

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

Re: Playlist item BUG?

Postby tony72 » 29 May 2008 14:12

I'm seeing this bug also, I don't suppose anyone has come up with a fix or workaround? I have a function playVideo as below. The first time it's called, it's fine. However beyond the first time it is called, it always plays the previous video before the video specified in <videoPath>, even though according to playlist.itemCount, there is only 1 item in the playlist.

Code: Select all

function playVideo(videoPath){ var vlc = document.getElementById("vlc"); playbackStarted=false; playbackFinished=false; vlc.playlist.clear(); //alert(vlc.playlist.itemCount); vlc.playlist.add(videoPath); vlc.playlist.play(); setTimeout("detectEnd()",1000); }

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: Playlist item BUG?

Postby Beardless2 » 16 Dec 2008 14:37

im am also seeing this bug in 0.9.8a - anyone know how to get around it?

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Playlist item BUG?

Postby revolunet » 16 Dec 2008 14:48

i also have this kind of behaviour...

heres a workaround using the playItem function :

Code: Select all

var itemId=vlc.addtarget(uri, uri, options); vlc.playlist.playItem(itemId);
it doesnt empty the playlist, but it plays the correct item


hope this helps
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: Playlist item BUG?

Postby Beardless2 » 16 Dec 2008 16:00

Thank you - that indeed does provide a work around.

Developers - please can we get a proper fix in the next release?

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Playlist item BUG?

Postby revolunet » 16 Dec 2008 16:01

this bug has been notifed in TRAC so it wil be fixed as soon as someone post a patch...
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

Music Lover
Blank Cone
Blank Cone
Posts: 11
Joined: 02 Dec 2008 10:02

Re: Playlist item BUG?

Postby Music Lover » 04 Jan 2009 23:02

I am facing the same issue

fablec
New Cone
New Cone
Posts: 2
Joined: 03 Jun 2009 13:41

Re: Playlist item BUG?

Postby fablec » 03 Jun 2009 13:46

I've the same problem and as workaround i use this solution :

vlc.playlist.clear();
vlc.playlist.add("file://"+Library+Artist+"/"+Album+"/"+SongList.selectedItem.label);
vlc.playlist.next();
vlc.playlist.play();

it's work fine for me, hpe this is helpful


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 7 guests