diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index b9cadef31..51e514d2a 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -1149,6 +1149,8 @@ class Monitor extends ZM_Object {
'; + $player = isset($options['player']) ? $options['player'] : $this->DefaultPlayer(); + if ($this->Type() == 'WebSite') { $html .= getWebSiteUrl( 'liveStream'.$this->Id(), $this->Path(), @@ -1166,6 +1168,20 @@ class Monitor extends ZM_Object { 'format' => ZM_MPEG_LIVE_FORMAT ) ); $html .= getVideoStreamHTML( 'liveStream'.$this->Id(), $streamSrc, $options['width'], $options['height'], ZM_MPEG_LIVE_FORMAT, $this->Name() ); + } else if ($player == 'zms') { + if ( $options['mode'] == 'stream' and canStream() ) { + $options['mode'] = 'jpeg'; + $streamSrc = $this->getStreamSrc($options); + $html .= getImageStreamHTML('liveStream'.$this->Id(), $streamSrc, $options['width'], $options['height'], $this->Name()); + } else if ( $options['mode'] == 'single' and canStream() ) { + $streamSrc = $this->getStreamSrc($options); + $html .= getImageStreamHTML('liveStream'.$this->Id(), $streamSrc, $options['width'], $options['height'], $this->Name()); + } else if ( $options['mode'] == 'paused' and canStream() ) { + $streamSrc = $this->getStreamSrc($options); + $html .= getImageStreamHTML('liveStream'.$this->Id(), $streamSrc, $options['width'], $options['height'], $this->Name()); + } else { + Debug("What mode or canStream? ".$options['mode']." ".canStream()); + } } else if ($this->JanusEnabled() or ($this->RTSP2WebEnabled() and ZM_RTSP2WEB_PATH) or ($this->Go2RTCEnabled() and ZM_GO2RTC_PATH)) { $html .= '