Playlist without JS - loading file into web VLC player

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
DjBS
New Cone
New Cone
Posts: 5
Joined: 30 Aug 2010 02:39

Playlist without JS - loading file into web VLC player

Postby DjBS » 30 Aug 2010 02:46

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 :)

torresmedia
New Cone
New Cone
Posts: 8
Joined: 19 Aug 2010 08:24

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

Postby torresmedia » 31 Aug 2010 09:05

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 :)

DjBS
New Cone
New Cone
Posts: 5
Joined: 30 Aug 2010 02:39

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

Postby DjBS » 31 Aug 2010 14:12

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


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 12 guests