Hi there,
There was another post that answered your question, but it only has the Play and Stop buttons. I can't figure out how to add Pause or Fullscreen, or any other controls. However, since you said you are using PHP from a database, here is the code modified to pull the movie from a database.
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 pause(obj) {
var obj = document.getElementById(obj);
obj.playlist.pause();
}
function init() {
play('vlc1', 'http://<?php echo $address; ?>/<?php echo $row['alias']; ?>/<?php echo $row['link']; ?>');
}
</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://<?php echo $address; ?>/<?php echo $row['alias']; ?>/<?php echo $row['link']; ?>');">start</button>
<button onclick="pause('vlc1');">pause</button>
<button onclick="stop('vlc1');">stop</button>
I've got the variable "address" set to be the IP address of the host, and the variable "alias" set to be the external hard drive the movie is on, and the variable "link" set to be the file name. You can easially change these to suit your needs, by changing the http: address using your own php variables.