Skip to content

Commit

Permalink
Merge pull request #64 from yusufbktmr/master
Browse files Browse the repository at this point in the history
port of stream target #35
  • Loading branch information
akeller authored Jul 1, 2020
2 parents 62efdcf + afcf57e commit fcc9e69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/StreamTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class StreamTarget extends Wowza
protected $password = null;
protected $streamName = 'myStream';
protected $appName;
protected $port = 1935

public function __construct(Settings $settings, $appName)
{
Expand All @@ -34,7 +35,8 @@ public function create(
$userName = null,
$password = null,
$streamName = null,
$application = null
$application = null,
$port = null
) {
$this->restURI = $this->getRestURI() . '/' . $entryName;
$this->sourceStreamName = (!is_null($sourceStreamName)) ? $sourceStreamName : $this->sourceStreamName;
Expand All @@ -45,6 +47,7 @@ public function create(
$this->password = (!is_null($password)) ? $password : $this->password;
$this->streamName = (!is_null($streamName)) ? $streamName : $this->streamName;
$this->application = (!is_null($application)) ? $application : $this->application;
$this->port = (!is_null($port)) ? ($int)$port : $this->port;

$response = $this->sendRequest($this->preparePropertiesForRequest(self::class), []);

Expand All @@ -59,7 +62,8 @@ public function update(
$userName = null,
$password = null,
$streamName = null,
$application = null
$application = null,
$port = null
) {
$this->restURI = $this->getRestURI() . "/" . $entryName;
$this->sourceStreamName = (!is_null($sourceStreamName)) ? $sourceStreamName : $this->sourceStreamName;
Expand All @@ -70,6 +74,7 @@ public function update(
$this->password = (!is_null($password)) ? $password : $this->password;
$this->streamName = (!is_null($streamName)) ? $streamName : $this->streamName;
$this->application = (!is_null($application)) ? $application : $this->application;
$this->port = (!is_null($port)) ? ($int)$port : $this->port;

return $this->sendRequest($this->preparePropertiesForRequest(self::class), [], self::VERB_PUT);
}
Expand Down

1 comment on commit fcc9e69

@ho0406
Copy link

@ho0406 ho0406 commented on fcc9e69 Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 50 , line 77 should be
(int)$port
instend of
($int)$port

Please sign in to comment.