Example #1
0
 /**
  * check if a stream is running on host/port
  *
  * @param $port
  * @return boolean
  */
 function isStreamRunning($port)
 {
     global $instanceVlc;
     // initialize if needed
     if (!isset($instanceVlc)) {
         Vlc::initialize();
     }
     // call instance-method
     return $instanceVlc->instance_isStreamRunning($port);
 }
Example #2
0
        $target_vidc = $_POST['vidc'];
        $target_vbit = $_POST['vbit'];
        $target_audc = $_POST['audc'];
        $target_abit = $_POST['abit'];
        // only valid dirs + entries with permission
        if (!(tfb_isValidPath($targetFile) && isValidEntry(basename($targetFile)) && hasPermission($targetFile, $cfg["user"], 'r'))) {
            AuditAction($cfg["constants"]["error"], "ILLEGAL VLC-ACCESS: " . $cfg["user"] . " tried to view " . $fileName . " in " . $dirName);
            @error("Illegal access. Action has been logged.", "", "");
        }
        // set template vars
        $tmpl->setvar('file', $fileName);
        $tmpl->setvar('vidc', $target_vidc);
        $tmpl->setvar('vbit', $target_vbit);
        $tmpl->setvar('audc', $target_audc);
        $tmpl->setvar('abit', $target_abit);
        $tmpl->setvar('addr', Vlc::getAddr());
        $tmpl->setvar('port', Vlc::getPort());
        // start vlc
        Vlc::start($cfg["path"] . $targetFile, $target_vidc, $target_vbit, $target_audc, $target_abit);
        break;
    case "stop":
        // stop vlc
        Vlc::stop();
        break;
}
// title-bar
tmplSetTitleBar($cfg["pagetitle"] . " - " . "vlc", false);
// iid
tmplSetIidVars();
// parse template
$tmpl->pparse();