Hi, I need help for a vlc Html code

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
zebtvlive
New Cone
New Cone
Posts: 2
Joined: 18 Mar 2011 18:13

Hi, I need help for a vlc Html code

Postby zebtvlive » 18 Mar 2011 18:29

Hi, I need help for a vlc Html code.
I would like to embed button two and one for the rest, one for full screen.
Who can help me?

Code: Select all

<script language="javascript"> function play(obj, uri) { var obj = document.getElementById(obj); obj.playlist.add(uri,uri, ""); obj.playlist.play(); } function stop(obj) { var obj = document.getElementById(obj); obj.playlist.stop(); } function init() { play('vlc1', 'http://192.xxx.xxx.x/1.flv'); } </script> <OBJECT> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="500" height="480" rtsp-caching="80" id="vlc1"> </embed> </OBJECT> <button onclick="play('vlc1', 'http://192.xxx.xxx.x/1.flv');">start</button> <button onclick="stop('vlc1');">stop</button>

lightfighter
New Cone
New Cone
Posts: 4
Joined: 14 Apr 2011 18:12

Re: Hi, I need help for a vlc Html code

Postby lightfighter » 14 Apr 2011 18:16

This is the only code that has worked for me. I too would like to have the rest of the control buttons if someone knows how to add them. I have tried many tutorials about adding controls, also many tutorials on how to embed the player into a web page, and so far this code is the only one that works.

lightfighter
New Cone
New Cone
Posts: 4
Joined: 14 Apr 2011 18:12

Re: Hi, I need help for a vlc Html code

Postby lightfighter » 14 Apr 2011 18:49

I figured out how to add a pause button. Just after the following code:

Code: Select all

function stop(obj) { var obj = document.getElementById(obj); obj.playlist.stop(); }
add this:

Code: Select all

function pause(obj) { var obj = document.getElementById(obj); obj.playlist.togglePause(); }
and then add the button like this:

Code: Select all

<button onclick="pause('vlc1');">pause</button>
I'm still looking for a fullscreen button, but I'm not having much luck. Can anyone help?

zebtvlive
New Cone
New Cone
Posts: 2
Joined: 18 Mar 2011 18:13

Re: Hi, I need help for a vlc Html code

Postby zebtvlive » 06 Jun 2011 22:30

thanks lightfighter


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests