Embedding VLC in a web page

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Embedding VLC in a web page

Postby wambozii » 20 Sep 2006 18:44

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?

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 21 Sep 2006 14:39

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 21 Sep 2006 15:20

yep. :lol:
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

mirand
New Cone
New Cone
Posts: 1
Joined: 21 Sep 2006 17:13

Postby mirand » 21 Sep 2006 17:56

Can you please zip it up and attach it for all to see.

ottos
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Sep 2006 17:57

Postby ottos » 21 Sep 2006 18:09

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?

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 21 Sep 2006 18:33

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!

ottos
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Sep 2006 17:57

Postby ottos » 22 Sep 2006 12:08

Thx works fine.
How do you think it is possible to have playlist played?

lagarazo
Blank Cone
Blank Cone
Posts: 34
Joined: 20 Sep 2006 13:50

Postby lagarazo » 22 Sep 2006 12:27

It does not work for me, I just see a blank rectangle where there should be the movie.

ottos
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Sep 2006 17:57

Postby ottos » 22 Sep 2006 12:47

to: wambozii

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

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 22 Sep 2006 16:18

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.

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 22 Sep 2006 16:21

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.

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 26 Sep 2006 18:24

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.

francesco75
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2006 09:46

The code works fine but...

Postby francesco75 » 27 Sep 2006 11:56

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 ?

francesco75
New Cone
New Cone
Posts: 9
Joined: 15 Sep 2006 09:46

Work from a server

Postby francesco75 » 27 Sep 2006 12:24

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

wambozii
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Sep 2006 18:33

Postby wambozii » 27 Sep 2006 13:27

That does definitely seem like what i need. But any code sample with which i could play?

jvlc
New Cone
New Cone
Posts: 5
Joined: 27 Sep 2006 15:49

Web embedded problem...

Postby jvlc » 27 Sep 2006 15:58

VLC web embedded seem doesn't work with special chars as "ò à ù ì è".
I am using 0.8.5 version.

Can anybody help me?

nonamevlc
Blank Cone
Blank Cone
Posts: 26
Joined: 26 Sep 2006 19:11

Any working sample page?

Postby nonamevlc » 27 Sep 2006 19:25

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

nonamevlc
Blank Cone
Blank Cone
Posts: 26
Joined: 26 Sep 2006 19:11

Doesnt work in Firefox

Postby nonamevlc » 27 Sep 2006 19:54

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?

85thday
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Sep 2006 16:12

Postby 85thday » 27 Sep 2006 22:40

nice, but how would i add a rewind and fast forward buttons?

85thday
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Sep 2006 16:12

Postby 85thday » 28 Sep 2006 19:46

Any one, please

jvlc
New Cone
New Cone
Posts: 5
Joined: 27 Sep 2006 15:49

Maybe is for you

Postby jvlc » 28 Sep 2006 19:53

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!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 49 guests