source remote server when streaming event

This commit is contained in:
Isaac Connor 2017-12-21 16:53:46 -08:00
parent f036e95793
commit 915ea93348
1 changed files with 10 additions and 1 deletions

View File

@ -160,7 +160,16 @@ class Event {
public function getStreamSrc( $args=array(), $querySep='&' ) { public function getStreamSrc( $args=array(), $querySep='&' ) {
if ( $this->{'DefaultVideo'} and $args['mode'] != 'jpeg' ) { if ( $this->{'DefaultVideo'} and $args['mode'] != 'jpeg' ) {
return ( ZM_BASE_PATH != '/' ? ZM_BASE_PATH : '' ).'/index.php?view=view_video&eid='.$this->{'Id'}; $streamSrc = ZM_BASE_PROTOCOL.'://';
$Monitor = $this->Monitor();
if ( $Monitor->ServerId() ) {
$Server = $Monitor->Server();
$streamSrc .= $Server->Hostname();
} else {
$streamSrc .= $_SERVER['HTTP_HOST'];
}
$streamSrc .= ( ZM_BASE_PATH != '/' ? ZM_BASE_PATH : '' ).'/index.php?view=view_video&eid='.$this->{'Id'};
return $streamSrc;
} }
$streamSrc = ZM_BASE_URL.ZM_PATH_ZMS; $streamSrc = ZM_BASE_URL.ZM_PATH_ZMS;