vlc plugin don't play entire song in playlist .

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
RamyRew
New Cone
New Cone
Posts: 4
Joined: 03 Oct 2010 20:39

vlc plugin don't play entire song in playlist .

Postby RamyRew » 24 Jun 2011 16:56

I try to create music page using php & javascript.

first of all I add 01.mpg and 02.mpg to playlist and then click play. when song(01.mpg) finished. vlc don't start to play 02.mpg.
when I use "vlc.playlist.items.count" to check the number of song in playlist. It shows "2" that mean vlc plugin don't play 2rd song in playlist.

this is my code.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="640" height="480" id="vlc" autoplay="yes" loop="yes"> </embed> <script language="Javascript"> var vlc = document.getElementById("vlc"); //var currSongLength; /////////// /////////////////////// function getLength() { var vlc = document.getElementById("vlc"); var length=vlc.input.length; alert (length); } ///MY function getTotal() { var vlc = document.getElementById("vlc"); //var total=vlc.playlist.itemCount; var total=vlc.playlist.items.count; alert(total); } //setInterval('getLength()', 5000); </script> <a href="#" onclick="javascript:vlc.playlst.clear()">Clear</a> <a href="#" onClick="javascript:vlc.playlist.add('01.mpg');">Add</a> <a href="#" onClick="javascript:vlc.playlist.add('02.mpg');">Add2</a> <a href="#" onClick="javascript:vlc.playlist.play();">Play</a> <a href="#" onClick="javascript:getTotal();">Total</a> <a href="#" onClick="javascript:vlc.playlist.next();">Next</a> <a href="#" onClick="javascript:getLength();">Get Length</a><br/> </body> </html>

darius
Blank Cone
Blank Cone
Posts: 28
Joined: 14 Jul 2010 00:58

Re: vlc plugin don't play entire song in playlist .

Postby darius » 17 Aug 2011 18:50

Thanks for your code, just tested and it started to work for me Firefox + plugin.

Beefster
New Cone
New Cone
Posts: 1
Joined: 09 Nov 2011 19:14

Re: vlc plugin don't play entire song in playlist .

Postby Beefster » 10 Nov 2011 05:44

I try to create music page using php & javascript.

first of all I add 01.mpg and 02.mpg to playlist and then click play. when song(01.mpg) finished. vlc don't start to play 02.mpg.
when I use "vlc.playlist.items.count" to check the number of song in playlist. It shows "2" that mean vlc plugin don't play 2rd song in playlist.

this is my code.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="640" height="480" id="vlc" autoplay="yes" loop="yes"> </embed> <script language="Javascript"> var vlc = document.getElementById("vlc"); //var currSongLength; /////////// /////////////////////// function getLength() { var vlc = document.getElementById("vlc"); var length=vlc.input.length; alert (length); } ///MY function getTotal() { var vlc = document.getElementById("vlc"); //var total=vlc.playlist.itemCount; var total=vlc.playlist.items.count; alert(total); } //setInterval('getLength()', 5000); </script> <a href="#" onclick="javascript:vlc.playlst.clear()">Clear</a> <a href="#" onClick="javascript:vlc.playlist.add('01.mpg');">Add</a> <a href="#" onClick="javascript:vlc.playlist.add('02.mpg');">Add2</a> <a href="#" onClick="javascript:vlc.playlist.play();">Play</a> <a href="#" onClick="javascript:getTotal();">Total</a> <a href="#" onClick="javascript:vlc.playlist.next();">Next</a> <a href="#" onClick="javascript:getLength();">Get Length</a><br/> </body> </html>
Not really sure what Darius is talking about (the previous poster is clearly asking for help), but I was curious to know if this issue has been resolved at all. I'm having the same annoying issue as Ramy here. The audio in my playlist stops about 30 seconds in and I can't, for the life of me, figure out why. Not sure if my computer speakers are on the fritz or what? Does anyone have a solution to this issue? It would be sincerely appreciated. Maybe someone can PM me with a solution? The code that Ramy posted is very similar to the one that I've observed. Thanks, all! Sorry for posting on here so late. :(


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests