Page 1 of 1

Playlist item BUG?

Posted: 22 Apr 2008 19:29
by crypticman
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.

Re: Playlist item BUG?

Posted: 23 Apr 2008 14:55
by crypticman
anyone had that issue?

Re: Playlist item BUG?

Posted: 25 Apr 2008 20:23
by genew
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

Re: Playlist item BUG?

Posted: 25 Apr 2008 22:49
by crypticman
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

Re: Playlist item BUG?

Posted: 29 May 2008 14:12
by tony72
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); }

Re: Playlist item BUG?

Posted: 16 Dec 2008 14:37
by Beardless2
im am also seeing this bug in 0.9.8a - anyone know how to get around it?

Re: Playlist item BUG?

Posted: 16 Dec 2008 14:48
by revolunet
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

Re: Playlist item BUG?

Posted: 16 Dec 2008 16:00
by Beardless2
Thank you - that indeed does provide a work around.

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

Re: Playlist item BUG?

Posted: 16 Dec 2008 16:01
by revolunet
this bug has been notifed in TRAC so it wil be fixed as soon as someone post a patch...

Re: Playlist item BUG?

Posted: 04 Jan 2009 23:02
by Music Lover
I am facing the same issue

Re: Playlist item BUG?

Posted: 03 Jun 2009 13:46
by fablec
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