Page 1 of 1

Embedding VLC in a web page

Posted: 20 Sep 2006 18:44
by wambozii
Hi guys i am completely new to VLC and i am building a multicast system so it was recommended by one my collegues that we use VLC in our web page.

That is my task to do.
Any ideas will be appreciated.
NB: I have embedded windows media player as an activeX object..does embeding VLC work along thesame line?

Posted: 21 Sep 2006 14:39
by wambozii
Hi guys, i have managed to embed VLC in the web page and it works find.
Anyone want the code, just let us know.

Thanks.

Posted: 21 Sep 2006 15:20
by Jean-Baptiste Kempf
yep. :lol:

Posted: 21 Sep 2006 17:56
by mirand
Can you please zip it up and attach it for all to see.

Posted: 21 Sep 2006 18:09
by ottos
Hi guys, i have managed to embed VLC in the web page and it works find.
Anyone want the code, just let us know.

Thanks.
Yes its very interesting . Can please give the code for posting embedded vlc on the web page?

Posted: 21 Sep 2006 18:33
by wambozii
Okay embed the following code somewhere in the body of your HTML page:

<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/video ... /axvlc.cab"
width="476" height="380" id="vlc" events="True">
<param name="Src" value="C:\Documents and Settings\jmuna\Desktop\sw_8M.mov"/>
<param name="ShowDisplay" value="True" />
<param name="Loop" value="True" />
<param name="AutoPlay" value="True" />
<param name="AutoLoop" value="True" />
<param name="Volume" value="100">
</OBJECT>
<BR>
<input type='button' class='submit' style='width:50px;height:25px' value='Play' onClick='document.vlc.play();'>
<input type='button' class='submit' style='width:50px;height:25px' value='Stop' onClick='document.vlc.stop();'>
<input type='button' class='submit' style='width:50px;height:25px' value='Mute' onClick='document.vlc.togglemute();'>
<input type='button' class='submit' style='width:95px;height:25px' value='Fullscreen' onClick='document.vlc.fullscreen();'>

</OBJECT>

For the value of the Scr parameter, please direct the control to a movie ((make sure you specify the full path) and you should see it playing in your page.

Hope this helpsm
have fun!

Posted: 22 Sep 2006 12:08
by ottos
Thx works fine.
How do you think it is possible to have playlist played?

Posted: 22 Sep 2006 12:27
by lagarazo
It does not work for me, I just see a blank rectangle where there should be the movie.

Posted: 22 Sep 2006 12:47
by ottos
to: wambozii

Where can I get description of commands like 'document.vlc.play();
i dont see in vlc pdfs object "document."

Posted: 22 Sep 2006 16:18
by wambozii
Look at the code again guys, the value of the source parameter ends with:
sw_8M.mov

That is a movie that i had downloaded earlier and placed it on my desktop so
that i could test the control to make sure that it works.

So in your case, download a movie and place it on your desktop (or anywhere else) and direct the control to the movie. Note that you have use the appropriate movie name and full path to the movie location. If you do that correctly it should "autoplay" in the control on your webpage.

Just take your time and look at the code carefully. It is quite easy.
If it still doesn't work, tell me what exactly is happening and i will tell you what to do about it.

Posted: 22 Sep 2006 16:21
by wambozii
For now, i don't know anything much more about VLC than to embed it in a web page. I am new to it and still exploring it as well.

Posted: 26 Sep 2006 18:24
by wambozii
Guys i am in trouble again. The code i posted for embedding VLC in a web page was fo a local embed i.e. not on a web server.

Now i have put the web page on an apache web server and it does not work.

Any ideas?

Thanks in advance.

The code works fine but...

Posted: 27 Sep 2006 11:56
by francesco75
Your code works fine but when I clik on the video it just desappear... the only way to have it back is to refresh the browser. Any idea ?

Work from a server

Posted: 27 Sep 2006 12:24
by francesco75
I think that as source you need to use a stream like:
<param name="Src" value="udp://@"/>
What you need, I guess, is:
1 - The IP of the PC to stream to
2 - Start to strem the source (disc, pci device...) via the server to the reconized IP

Posted: 27 Sep 2006 13:27
by wambozii
That does definitely seem like what i need. But any code sample with which i could play?

Web embedded problem...

Posted: 27 Sep 2006 15:58
by jvlc
VLC web embedded seem doesn't work with special chars as "ò à ù ì è".
I am using 0.8.5 version.

Can anybody help me?

Any working sample page?

Posted: 27 Sep 2006 19:25
by nonamevlc
Hi Wambozzi.

Your idea of embedding vlc in webpage is interesting.

I just tried your code on firefox with code pointing to a video on desktop . I get the player buttons on the webpage.But when i hit play,nothing happens.
,
Do i have to download the file axvlc.cab seperately,that you mention in code

Code: Select all

<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"

Iam new to this too ! :)

Doesnt work in Firefox

Posted: 27 Sep 2006 19:54
by nonamevlc
Ok. The Code works fine in Internet Explorer 6.

However it doesnt work in firefox [my version is latest 1.5.0.7]

One advantage of using VLC in Webpage is,after the video is made fullscreen in the webpage, all of VLC player's shortcut keys work!

Currently that code uses the vlc player 0.8.5 installed on the system to play.
What if the user doesnt have VLC player installed?

From that INF, it seems the installer executable is downloaded ,installed and then the video is played? Is that how it works?

Posted: 27 Sep 2006 22:40
by 85thday
nice, but how would i add a rewind and fast forward buttons?

Posted: 28 Sep 2006 19:46
by 85thday
Any one, please

Maybe is for you

Posted: 28 Sep 2006 19:53
by jvlc
You can use Javascript commands to control VLC Object:

document.vlc.playFaster()
document.vlc.playSlower()

"vlc" is the ID of used object, as the follow:

-------------------------------------------------------------------------
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/video ... /axvlc.cab"
width="640" height="680" id="vlc">
-------------------------------------------------------------------------

By!