Exemplo n.º 1
0
 public function getStreamSrc($args, $querySep = '&')
 {
     if (isset($this->{'ServerId'}) and $this->{'ServerId'}) {
         $Server = new Server($this->{'ServerId'});
         $streamSrc = ZM_BASE_PROTOCOL . '://' . $Server->Hostname() . ZM_PATH_ZMS;
     } else {
         $streamSrc = ZM_BASE_URL . ZM_PATH_ZMS;
     }
     $args[] = "monitor=" . $this->{'Id'};
     if (ZM_OPT_USE_AUTH) {
         if (ZM_AUTH_RELAY == "hashed") {
             $args[] = "auth=" . generateAuthHash(ZM_AUTH_HASH_IPS);
         } elseif (ZM_AUTH_RELAY == "plain") {
             $args[] = "user="******"pass="******"none") {
             $args[] = "user="******"mode=single", $args) && !empty($GLOBALS['connkey'])) {
         $args[] = "connkey=" . $GLOBALS['connkey'];
     }
     if (ZM_RAND_STREAM) {
         $args[] = "rand=" . time();
     }
     if (count($args)) {
         $streamSrc .= "?" . join($querySep, $args);
     }
     return $streamSrc;
 }
Exemplo n.º 2
0
function getZmuCommand($args)
{
    $zmuCommand = ZMU_PATH;
    if (ZM_OPT_USE_AUTH) {
        if (ZM_AUTH_RELAY == "hashed") {
            $zmuCommand .= " -A " . generateAuthHash(false);
        } elseif (ZM_AUTH_RELAY == "plain") {
            $zmuCommand .= " -U " . escapeshellarg($_SESSION['username']) . " -P " . escapeshellarg($_SESSION['password']);
        } elseif (ZM_AUTH_RELAY == "none") {
            $zmuCommand .= " -U " . escapeshellarg($_SESSION['username']);
        }
    }
    $zmuCommand .= $args;
    return $zmuCommand;
}
Exemplo n.º 3
0
 public function getStreamSrc($args, $querySep = '&')
 {
     return ZM_BASE_URL . '/index.php?view=view_video&eid=' . $this->{'Id'};
     $streamSrc = ZM_BASE_URL . ZM_PATH_ZMS;
     $args[] = "source=event&event=" . $this->{'Id'};
     if (ZM_OPT_USE_AUTH) {
         if (ZM_AUTH_RELAY == "hashed") {
             $args[] = "auth=" . generateAuthHash(ZM_AUTH_HASH_IPS);
         } elseif (ZM_AUTH_RELAY == "plain") {
             $args[] = "user="******"pass="******"none") {
             $args[] = "user="******"mode=single", $args) && !empty($GLOBALS['connkey'])) {
         $args[] = "connkey=" . $GLOBALS['connkey'];
     }
     if (ZM_RAND_STREAM) {
         $args[] = "rand=" . time();
     }
     if (count($args)) {
         $streamSrc .= "?" . join($querySep, $args);
     }
     return $streamSrc;
 }