Page 1 of 1

Hi, I need help for a vlc Html code

Posted: 18 Mar 2011 18:29
by zebtvlive
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>

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

Posted: 14 Apr 2011 18:16
by lightfighter
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.

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

Posted: 14 Apr 2011 18:49
by lightfighter
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?

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

Posted: 06 Jun 2011 22:30
by zebtvlive
thanks lightfighter