Page 1 of 1

Playlist without JS - loading file into web VLC player

Posted: 30 Aug 2010 02:46
by DjBS
Hi, I'm searching in internet how to do that but i cant find nothig...
I mean that:
I want to load file like: asx, xspf, mu3 and other into web site without JavaScript, because i want to hide the url in the playlist, and when that is in file, i can hide it, but i really don't know how to make the embed code to work with playlist file.
And if that is possible, how to build the source code of playlist file?
Thanks :)

Re: Playlist without JS - loading file into web VLC player

Posted: 31 Aug 2010 09:05
by torresmedia
How about generating a playlist in something like PHP, and the embed the created playlist-file into the site?

Pseudo-code:

Code: Select all

PHP Add Element #1 to playlist PHP Add Element #2 to playlist ..... PHP Saves Playlist to file PHP Generate Embedded playlist VLC-player with the generated playlistfile Write XHTML-page Display page to user
By doing this, the user will only be able to view the embedded VLC-players source, and no JS is required?

I really don't know if this was what you were looking for, but let me know what you think :)

Re: Playlist without JS - loading file into web VLC player

Posted: 31 Aug 2010 14:12
by DjBS
Here is my player with JS:

Code: Select all

<script type="text/javascript" src="http://code.revolunet.com/VLCobject/VLCobject.js"></script> <script type="text/javascript"> var so = new VLCObject("vlc", "385", "300"); so.addParam("MRL","'.$playing.'"); so.write("vlccontents"); </script> <script type="text/javascript"> function play() { var vlc = document.getElementById("vlc"); //alert(vlc.playlist); vlc.playlist.add("'.$playing.'", null, Array()); vlc.playlist.play(); } </script>
so... $playing is the stream URL and when i replace it with playlist... it doesn't work.. I try with asx playlist, with xspf playlist based xml, mu3 playlist... but nothing... maybe this code for player is wrong... please help :S