Log in

View Full Version : Videolan javascript


neo75903
16th December 2004, 15:30
Good news for those interested embedding a mediaplayer in a webpage. Videolan javascript reference has been updated. Have a look at:
http://www.videolan.org/doc/play-howto/en/ch04.html#id2534770

Video Master
21st December 2004, 18:50
Thats Gr8 New i was always wating for this thing.

but i am having problem configuring it.
it says


Taken from
Link:- http://www.videolan.org/doc/play-howto/en/ch04.html#id2534770
----------
Windows

Quit Firefox or Mozilla

Copy the two files in VLC_Installation_folder\mozilla
(usually C:\Program Files\VideoLAN\VLC\mozilla) to your mozilla
plugins directory (Usually C:\Program Files\Mozilla\plugins or
C:\Program Files\Mozilla Firefox\plugins).


Restart Firefox or Mozilla
----------


But which 2 files to copy.

and this plugin works only with mozilla and firefox not IE,Opera etc..

where do i exactly download the plugin for mozilla and firefox

neo75903
22nd December 2004, 02:25
The plugin comes toghether with the standard install.
If you have a standard installation like me the following two files needs to be copied into the browsers plugin directory:
c:\Program Files\VideoLAN\VLC\mozilla\vlcintf.xpt
c:\Program Files\VideoLAN\VLC\mozilla\npvlc.dll

to for my example:
C:\Program Files\Mozilla Firefox\plugins

Restart your browser and type in the location bar:
about:plugins

it now should show "VLC multimedia plugin" somewhere in the list.
If not, something went wrong.

IE uses ActiveX as their plugin which is completely different from the Mozilla used plugin model.
You can embed Windows Media Player to provide similar functions.

Video Master
22nd December 2004, 04:23
i just tried copying the 2 files to the plugins folder of Firefox.

and then opened a sample webpage.

I am streaming a Test.wmv file from VLC http stream no extra options.
MpegTS - 127.0.0.1:1234


<html>
<head><title>Demo of VLC mozilla plugin</title></head>
<body>
<h1>Demo of VLC mozilla plugin - Example 1</h1>
<embed type="application/x-vlc-plugin"
name="video1"
autoplay="no" loop="yes" width="400" height="300"
target="http://127.0.0.1:1234/" />
<br />
<a href="javascript:;" onclick='document.video1.play()'>Play video1</a>
<a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a>
<a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a>
<a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a>

</body>
</html>



But it gives me a message plugin not installed - Click here to download and when i click it says plugin not found.

Video Master
22nd December 2004, 04:36
Well after typing "about:plugins"

it is showing me VLC entry like this


VLC multimedia plugin

File name: npvlc.dll
VLC multimedia plugin Version "0.8.0"

VideoLAN WWW: http://www.videolan.org/

MIME Type Description Suffixes Enabled
audio/mpeg MPEG audio mp2,mp3,mpga,mpega Yes
audio/x-mpeg MPEG audio mp2,mp3,mpga,mpega Yes
video/mpeg MPEG video mpg,mpeg,mpe Yes
video/x-mpeg MPEG video mpg,mpeg,mpe Yes
video/mpeg-sts MPEG video mpg,mpeg,vob Yes


is it ok

but no luck playing the file

neo75903
22nd December 2004, 14:41
Can you play the file in Videolan standalone?

You also need to start another instance from Videolan which actually serves the file to your client.
I would suggest you to use "Streaming/Transcoding Wizard" under file menu to start with.
Then try your plugin.

Video Master
22nd December 2004, 19:11
yes i can play the file 100% in standalone VLC even stram it to other
VLC but no luck in opening the file in browser i am using VLC 0.8.0

neo75903
22nd December 2004, 20:47
This worked fine for me:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="yellow">
<h1>Demo of VLC mozilla plugin - Example 1</h1>
<embed type="application/x-vlc-plugin"
name="video1"
autoplay="no" loop="yes" width="400" height="300"
target="http://127.0.0.1:1234" />
<br>
<a href="#" onclick='document.video1.play()'>Play video1</a>
<a href="#" onclick='document.video1.pause()'>Pause video1</a>
<a href="#" onclick='document.video1.stop()'>Stop video1</a>
<a href="#" onclick='document.video1.fullscreen()'>Fullscreen</a>
</body>
</html>


Just a few corrections, mostly typos. Maybe handy to set autoplay to "yes".
VideoLan is currently at version 0.8.1. Maybe have a try with the latest version.