Skip to content

Commit

Permalink
Updated the LiveKit Protocol & improved param types.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-delorme committed Mar 9, 2024
1 parent 6a6a4ca commit f61a617
Show file tree
Hide file tree
Showing 29 changed files with 725 additions and 30 deletions.
2 changes: 1 addition & 1 deletion protocol
Submodule protocol updated 131 files
4 changes: 1 addition & 3 deletions src/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ class AccessToken {
/**
* AccessToken Constructor.
*
* @param \Agence104\LiveKit\AccessTokenOptions $options
* List of options.
* @param string|null $apiKey
* The LiveKit API Key, can be set in env LIVEKIT_API_KEY.
* @param string|null $apiSecret
* The LiveKit API Secret Key, can be set in env LIVEKIT_API_SECRET.
*
* @throws \Exception
*/
public function __construct(string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $apiKey = NULL, ?string $apiSecret = NULL) {
$apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY');
$apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET');

Expand Down
2 changes: 1 addition & 1 deletion src/BaseServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract class BaseServiceClient {
*
* @throws \Exception
*/
public function __construct(string $host = NULL, string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $host = NULL, ?string $apiKey = NULL, ?string $apiSecret = NULL) {
$host = $host ?? getenv('LIVEKIT_HOST');
$apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY');
$apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET');
Expand Down
2 changes: 1 addition & 1 deletion src/EgressServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EgressServiceClient extends BaseServiceClient {
/**
* {@inheritdoc}
*/
public function __construct(string $host = NULL, string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $host = NULL, ?string $apiKey = NULL, ?string $apiSecret = NULL) {
parent::__construct($host,$apiKey, $apiSecret);

$this->rpc = new EgressClient($this->host);
Expand Down
2 changes: 1 addition & 1 deletion src/IngressServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class IngressServiceClient extends BaseServiceClient {
/**
* {@inheritdoc}
*/
public function __construct(string $host = NULL, string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $host = NULL, ?string $apiKey = NULL, ?string $apiSecret = NULL) {
parent::__construct($host,$apiKey, $apiSecret);

$this->rpc = new IngressClient($this->host);
Expand Down
2 changes: 1 addition & 1 deletion src/RoomServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RoomServiceClient extends BaseServiceClient {
/**
* {@inheritdoc}
*/
public function __construct(string $host = NULL, string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $host = NULL, ?string $apiKey = NULL, ?string $apiSecret = NULL) {
parent::__construct($host,$apiKey, $apiSecret);

$this->rpc = new \Livekit\RoomServiceClient($this->host);
Expand Down
2 changes: 1 addition & 1 deletion src/WebhookReceiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WebhookReceiver {
*
* @throws \Exception
*/
public function __construct(string $apiKey = NULL, string $apiSecret = NULL) {
public function __construct(?string $apiKey = NULL, ?string $apiSecret = NULL) {
$apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY');
$apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET');

Expand Down
Binary file modified src/proto/GPBMetadata/LivekitEgress.php
Binary file not shown.
Binary file modified src/proto/GPBMetadata/LivekitIngress.php
Binary file not shown.
Binary file modified src/proto/GPBMetadata/LivekitModels.php
Binary file not shown.
Binary file modified src/proto/GPBMetadata/LivekitRoom.php
Binary file not shown.
5 changes: 5 additions & 0 deletions src/proto/Livekit/ConnectionQuality.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions src/proto/Livekit/CreateIngressRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 38 additions & 4 deletions src/proto/Livekit/CreateRoomRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f61a617

Please sign in to comment.