Skip to content

Commit

Permalink
port of stream target #35
Browse files Browse the repository at this point in the history
  • Loading branch information
bektemiryusuf committed Jun 10, 2020
1 parent e911db3 commit afcf57e
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

0 comments on commit afcf57e

Please sign in to comment.