Hi
This code goes well with play, stop and fullscreen button, the only thing is the pause button is not there. How to make pause button? I try to make pause button but when it streams video, when I click pause, it stop but it work play again when i click at play button.
Please help.
Newbie
<?php
function printInstructions( ) {
?>
<html>
<body style="text-align:center;color:#F7EBDE;font-family:Trebuchet MS;background-color:#73615A;" >
<h2>
<br/></br>To view movie, user need to make an option on the left area. User can either play the whole movie or play by events.</br></br> Please wait a while before the clips playing.</br>
</h2>
</body>
</html>
<?php
}
if (!isset ($_GET['playnow']) ){
printInstructions();
die();
}
?>
<SCRIPT LANGUAGE="JavaScript" >
function getVLC(name )
{
if (window.document[ name])
{
if (navigator.appName.indexOf ("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds [name])
return document.embeds[name ];
}
return window.document[name ];
}
if (navigator.appName.indexOf ("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds [name])
return document.embeds[name ];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(name );
}
}
</script>
<html>
<body style="margin:0;padding:0;background-color:#73615A;">
<?php
require_once "../vlc.php";
include_once('../ez_sql.php' );
$movieID = $_GET[ 'movieID'];
$movie = $db->get_row ("select filmFile from Movie where movieID=$movieID");
if(isset ($_GET['stopTime']) ) {
$stopTime = $_GET[ 'stopTime'];
}
else {
$stopTime = 99999999;
}
$filmName = setupShot($movie ->filmFile, $_GET['movieID'], $_GET['startTime'], $stopTime );
if(isset ($_GET['eventID']) ) {
$eventID = $_GET[ 'eventID'];
}
else {
$eventID = "0";
}
?>
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://downloads.videolan.org/pub/video ... /axvlc.cab "
width="460" height="400" events= "True" name="vlc">
<param name="Src" value="rtsp://<?php echo $_SERVER['SERVER_ADDR']?>:554/<?php echo $filmName?>" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<EMBED pluginspage="http://www.videolan.org"
type="application/x-vlc-plugin"
progid="VideoLAN.VLCPlugin.2"
width="460"
height="400"
name="vlc"
autoplay="yes"
loop="no"
target="rtsp://<?php echo $_SERVER['SERVER_ADDR']?>:554/<?php echo $filmName?>"
id="vlc"></EMBED></object>
<form name="eventForm">
<input type="hidden" name="eventID" value="<?php echo $eventID?>" />
</form>
<table>
<tr>
<td width="460">
<form>
<TR><TD>
<input type="button" value="Play" name="play" onClick="getVLC('vlc').playlist.play()">
<input type="button" value="Stop" name="stop" onClick="getVLC('vlc').playlist.stop()">
<input type="button" value="Pause" name= "pause" onClick="getVLC('vlc').playlist.togglePause()">
<input type="button" value="Fullscreen" name="fullscreen" onClick="getVLC('vlc').video.toggleFullscreen();">
</form>
</td>
</tr>
</table>
</body>
</html>