can't use BASE_URL since it will be empty. Have to construct a full URL when using MIN_STREAMING_PORT

This commit is contained in:
Isaac Connor 2017-11-21 21:00:27 -05:00
parent 8b49a475d4
commit e617ffca2d
1 changed files with 4 additions and 2 deletions

View File

@ -185,11 +185,13 @@ private $control_fields = array(
} }
public function getStreamSrc( $args, $querySep='&' ) { public function getStreamSrc( $args, $querySep='&' ) {
$streamSrc = ZM_BASE_PROTOCOL.'://';
if ( isset($this->{'ServerId'}) and $this->{'ServerId'} ) { if ( isset($this->{'ServerId'}) and $this->{'ServerId'} ) {
$Server = new Server( $this->{'ServerId'} ); $Server = new Server( $this->{'ServerId'} );
$streamSrc = ZM_BASE_PROTOCOL.'://'.$Server->Hostname(); $streamSrc .= $Server->Hostname();
} else { } else {
$streamSrc = ZM_BASE_URL; $streamSrc .= $_SERVER['HTTP_HOST'] );
} }
if ( ZM_MIN_STREAMING_PORT ) if ( ZM_MIN_STREAMING_PORT )
$streamSrc .= ':'. (ZM_MIN_STREAMING_PORT+$this->{'Id'}); $streamSrc .= ':'. (ZM_MIN_STREAMING_PORT+$this->{'Id'});