Playing playlist on web

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
isoltechnologies
New Cone
New Cone
Posts: 7
Joined: 02 Apr 2009 13:17

Playing playlist on web

Postby isoltechnologies » 02 Apr 2009 13:30

Hi, Everyone
I want to play a playlist over the web but the script takes only a single file and play it. The question i want to ask is how can i play a playlist (e.g playlist.xml) my code is
myvlc = new VLCObject("mymovie", "600", "350");
myvlc.addParam("MRL","http://code.revolunet.com/VLCjs/rambo.mpg");
myvlc.write("vlccontent");

// load controls
vlc_controls = new VLCcontrols(myvlc);

vlc_controls.onready = function () {
alert(names[0]);
vlc_controls.play("video.wmv");
if i provide playlist.xml instead video.wmv it is not playing. with this script i am using VLCcontrols.js file.

daphatmac
New Cone
New Cone
Posts: 5
Joined: 13 Feb 2009 14:53

Re: Playing playlist on web

Postby daphatmac » 14 Apr 2009 09:00

Here's something we've been messing around with - it's more of a local playlist thing than an online one, but it may steer you in the right direction:

Code: Select all

<embed type="application/x-vlc-plugin" width="800" height="600" autoplay="no" loop="no" id="vlc"></embed> <script type="text/javascript"> function timer(){ mediatimer = setTimeout("timer()", 500) if (vlc.playlist.isPlaying == false) { //set and play video vlc.playlist.add("videofolder/" + source_playlist[current_media]['content'], "", options); vlc.playlist.add("vlc://quit"); vlc.playlist.play(); current_video+=1; } if (current_video == source_playlist.length) { current_video = 0; } } var options = new Array(":audio", ":quiet-synchro", ":no-video-title-show"); var vlc = document.getElementById("vlc"); //setup playlist array - can be sourced from file source_playlist = new Array(); source_playlist[0] = new Array(); source_playlist[0]['content'] = "video1.avi"; source_playlist[1] = new Array(); source_playlist[1]['content'] = "video2.avi"; var current_media = 0; timer(); </script>
Cheers,

George

jsmkbunch2000
New Cone
New Cone
Posts: 2
Joined: 15 Apr 2009 05:57

Re: Playing playlist on web

Postby jsmkbunch2000 » 15 Apr 2009 06:34

Hello. I am a noob. I don't know any code or http scripting. I figured out how to run the VlC on one computer and stream it to another computer on VLC (as client) using UDP foramt. I copied the above code to my notepad and saved as html doc. It shows it is waiting for video now, so how to I stream a video to my web browser. I am using firefox on Windows XP Os. Please provide step by step instrux on what to do next to play on my web browser. Thanks


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 19 guests