diff --git a/web/app/Controller/MonitorsController.php b/web/app/Controller/MonitorsController.php index e18c114d2..beefe9998 100755 --- a/web/app/Controller/MonitorsController.php +++ b/web/app/Controller/MonitorsController.php @@ -9,7 +9,7 @@ $this->set('monitors', $this->Monitor->find('all', $monitoroptions)); $monitors = $this->Monitor->find('all', array('recursive' => -1, 'fields' => array('Id', 'StreamReplayBuffer'))); foreach ($monitors as $monitor => $mon) { - $streamSrc[$monitor] = $this->Monitor->getStreamSrc($monitor['Monitor']['Id'], $zmBandwidth, $monitor['Monitor']['StreamReplayBuffer']); + $streamSrc[$mon['Monitor']['Id']] = $this->Monitor->getStreamSrc($mon['Monitor']['Id'], $zmBandwidth, $monitor['Monitor']['StreamReplayBuffer']); } $this->set('streamSrc', $streamSrc); } @@ -182,4 +182,4 @@ } } -?> \ No newline at end of file +?> diff --git a/web/app/Model/Monitor.php b/web/app/Model/Monitor.php index 9f050e2a0..f727283be 100644 --- a/web/app/Model/Monitor.php +++ b/web/app/Model/Monitor.php @@ -24,9 +24,9 @@ $ZM_MPEG_LIVE_FORMAT = $ZM_MPEG_LIVE_FORMAT; if ($ZM_WEB_STREAM_METHOD == 'mpeg' && $ZM_MPEG_LIVE_FORMAT) { - return "/cgi-bin/nph-zms?mode=mpeg&scale=100&maxfps=$ZM_WEB_VIDEO_MAXFPS&bitrate=$ZM_WEB_VIDEO_BITRATE&format=$ZM_MPEG_LIVE_FORMAT"; + return "/cgi-bin/nph-zms?mode=mpeg&scale=100&maxfps=$ZM_WEB_VIDEO_MAXFPS&bitrate=$ZM_WEB_VIDEO_BITRATE&format=$ZM_MPEG_LIVE_FORMAT&monitor=$id"; } else { - return "/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=$ZM_WEB_VIDEO_MAXFPS&buffer=$buffer"; + return "/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=$ZM_WEB_VIDEO_MAXFPS&buffer=$buffer&monitor=$id"; } } diff --git a/web/app/View/Helper/LiveStreamHelper.php b/web/app/View/Helper/LiveStreamHelper.php index ef8bf585d..627e82a2a 100755 --- a/web/app/View/Helper/LiveStreamHelper.php +++ b/web/app/View/Helper/LiveStreamHelper.php @@ -3,8 +3,8 @@ App::uses('AppHelper', 'View/Helper'); class LiveStreamHelper extends AppHelper { public function makeLiveStream($name, $src, $id, $width=0) { - $liveStream = ""; - return $liveStream; + $liveStream = ""; + return $src; } public function showNoImage($name, $src, $id, $width=0) { diff --git a/web/app/View/Monitors/index.ctp b/web/app/View/Monitors/index.ctp index e309444be..3e83a2a52 100755 --- a/web/app/View/Monitors/index.ctp +++ b/web/app/View/Monitors/index.ctp @@ -6,13 +6,17 @@