mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-02-02 02:21:07 -05:00
Add DefaultPlayer support in getStreamSrc
This commit is contained in:
@@ -1149,6 +1149,8 @@ class Monitor extends ZM_Object {
|
||||
</div>
|
||||
<div class="zoompan">';
|
||||
|
||||
$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 .= '<video id="liveStream'.$this->Id().'" '.
|
||||
((isset($options['width']) and $options['width'] and $options['width'] != '0')?'width="'.$options['width'].'"':'').
|
||||
|
||||
Reference in New Issue
Block a user