Pause button does not work!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nma
    New Member
    • Aug 2007
    • 93

    Pause button does not work!

    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.

    [PHP]<?php
    function printInstructio ns() {
    ?>
    <html>
    <body style="text-align:center;co lor:#F7EBDE;fon t-family:Trebuche t 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'])){
    printInstructio ns();
    die();
    }
    ?>

    <SCRIPT LANGUAGE="JavaS cript">
    function getVLC(name)
    {
    if (window.documen t[name])
    {
    if (navigator.appN ame.indexOf("Mi crosoft Internet")==-1)
    {
    if (document.embed s && document.embeds[name])
    return document.embeds[name];
    }
    return window.document[name];
    }
    if (navigator.appN ame.indexOf("Mi crosoft Internet")==-1)
    {
    if (document.embed s && document.embeds[name])
    return document.embeds[name];
    }
    else // if (navigator.appN ame.indexOf("Mi crosoft Internet")!=-1)
    {
    return document.getEle mentById(name);
    }
    }

    </script>

    <html>
    <body style="margin:0 ;padding:0;back ground-color:#73615A;" >
    <?php
    require_once "../vlc.php";
    include_once('. ./ez_sql.php');
    $movieID = $_GET['movieID'];
    $movie = $db->get_row("selec t filmFile from Movie where movieID=$movieI D");
    if(isset($_GET['stopTime'])) {
    $stopTime = $_GET['stopTime'];
    }
    else {
    $stopTime = 99999999;
    }
    $filmName = setupShot($movi e->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.video lan.org/pub/videolan/vlc/latest/win32/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="ShowDispl ay" value="True" />
    <param name="AutoLoop" value="False" />
    <param name="AutoPlay" value="True" />

    <EMBED pluginspage="ht tp://www.videolan.or g"
    type="applicati on/x-vlc-plugin"
    progid="VideoLA N.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').playlis t.play()">
    <input type="button" value="Stop" name="stop" onClick="getVLC ('vlc').playlis t.stop()">
    <input type="button" value="Stop" name="stop" onClick="getVLC ('vlc').playlis t.togglePause() ">
    <input type="button" value="Fullscre en" name="fullscree n" onClick="getVLC ('vlc').video.t oggleFullscreen ();">

    </form>
    </td>
    </tr>
    </table>
    </body>
    </html>[/PHP]
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    You will need to consult the documentation for the VLC Plugin you are utilizing.

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, NMA.

      Just 'cause you develop in PHP doesn't mean it's a PHP problem ~_^

      I'm going to go ahead and move this thread to the JavaScript forum, where our resident Experts will be better able to help you out.

      Comment

      • nma
        New Member
        • Aug 2007
        • 93

        #4
        thanks for the comment...I'll try to send to appropriate forum

        NMA

        Comment

        Working...