├── .gitmodules ├── src ├── proto │ ├── GPBMetadata │ │ ├── LivekitRoom.php │ │ ├── LivekitSip.php │ │ ├── LivekitAgent.php │ │ ├── LivekitEgress.php │ │ ├── LivekitIngress.php │ │ ├── LivekitMetrics.php │ │ ├── LivekitModels.php │ │ ├── LivekitWebhook.php │ │ ├── LivekitAgentDispatch.php │ │ └── Logger │ │ │ └── Options.php │ └── Livekit │ │ ├── ClientInfo_SDK.php │ │ ├── DataPacket_Kind.php │ │ ├── Encryption_Type.php │ │ ├── VideoLayer_Mode.php │ │ ├── DataStream_Chunk.php │ │ ├── DataStream_Header.php │ │ ├── StreamInfo_Status.php │ │ ├── DataStream_Trailer.php │ │ ├── ServerInfo_Edition.php │ │ ├── IngressState_Status.php │ │ ├── ParticipantInfo_Kind.php │ │ ├── DataStream_ByteHeader.php │ │ ├── DataStream_TextHeader.php │ │ ├── ParticipantInfo_State.php │ │ ├── SIPTrunkInfo_TrunkKind.php │ │ ├── DataStream_OperationType.php │ │ ├── ParticipantInfo_KindDetail.php │ │ ├── DataStream.php │ │ ├── Encryption.php │ │ ├── DeleteRoomResponse.php │ │ ├── SendDataResponse.php │ │ ├── MoveParticipantResponse.php │ │ ├── ForwardParticipantResponse.php │ │ ├── RemoveParticipantResponse.php │ │ ├── UpdateSubscriptionsResponse.php │ │ ├── AgentDispatchService.php │ │ ├── SIPFeature.php │ │ ├── ImageCodec.php │ │ ├── SegmentedFileSuffix.php │ │ ├── WorkerStatus.php │ │ ├── DataTrackExtensionID.php │ │ ├── SIPClient.php │ │ ├── SIPJsonClient.php │ │ ├── TrackType.php │ │ ├── EgressSourceType.php │ │ ├── EgressClient.php │ │ ├── EgressJsonClient.php │ │ ├── IngressClient.php │ │ ├── SegmentedFileProtocol.php │ │ ├── IngressJsonClient.php │ │ ├── TokenPagination.php │ │ ├── JobTermination.php │ │ ├── DataPacket │ │ └── Kind.php │ │ ├── RoomServiceClient.php │ │ ├── RoomServiceJsonClient.php │ │ ├── RpcAck.php │ │ ├── WorkerPing.php │ │ ├── PerformRpcResponse.php │ │ ├── ServerInfo │ │ └── Edition.php │ │ ├── ClientConfigSetting.php │ │ ├── StopEgressRequest.php │ │ ├── JobType.php │ │ ├── DeleteIngressRequest.php │ │ ├── IngressAudioEncodingPreset.php │ │ ├── DeleteSIPTrunkRequest.php │ │ ├── SIPCallDirection.php │ │ ├── AgentDispatchServiceClient.php │ │ ├── AgentDispatchServiceJsonClient.php │ │ ├── StreamProtocol.php │ │ ├── GetSIPInboundTrunkRequest.php │ │ ├── GetSIPOutboundTrunkRequest.php │ │ ├── Ingress.php │ │ ├── VideoQuality.php │ │ ├── SubscriptionError.php │ │ ├── AudioCodec.php │ │ ├── Encryption │ │ └── Type.php │ │ ├── DeleteRoomRequest.php │ │ ├── ConnectionQuality.php │ │ ├── DeleteSIPDispatchRuleRequest.php │ │ ├── IngressInput.php │ │ ├── ListParticipantsRequest.php │ │ ├── SIPTransferStatus.php │ │ ├── StreamInfo │ │ └── Status.php │ │ ├── VideoConfiguration.php │ │ ├── JobStatus.php │ │ ├── EncodedFileType.php │ │ ├── DataStream │ │ ├── ByteHeader.php │ │ └── OperationType.php │ │ ├── ListRoomsResponse.php │ │ ├── ProviderType.php │ │ ├── StreamInfoList.php │ │ ├── SIPTrunkInfo │ │ └── TrunkKind.php │ │ ├── ListEgressResponse.php │ │ ├── ImageFileSuffix.php │ │ ├── ListIngressResponse.php │ │ ├── ListSIPTrunkRequest.php │ │ ├── ListSIPTrunkResponse.php │ │ ├── SIPHeaderOptions.php │ │ ├── MuteRoomTrackResponse.php │ │ ├── ActiveSpeakerUpdate.php │ │ ├── SIPTransport.php │ │ ├── RoomAgent.php │ │ ├── ListSIPDispatchRuleResponse.php │ │ ├── ListSIPInboundTrunkResponse.php │ │ ├── VideoCodec.php │ │ ├── AudioMixing.php │ │ ├── ListSIPOutboundTrunkResponse.php │ │ ├── SIPMediaEncryption.php │ │ ├── ListParticipantsResponse.php │ │ ├── GetSIPInboundTrunkResponse.php │ │ ├── TrackSource.php │ │ ├── GetSIPOutboundTrunkResponse.php │ │ ├── ListAgentDispatchResponse.php │ │ ├── MigrateJobRequest.php │ │ ├── ListRoomsRequest.php │ │ ├── ParticipantInfo │ │ ├── KindDetail.php │ │ ├── State.php │ │ └── Kind.php │ │ ├── ReconnectReason.php │ │ ├── CreateSIPInboundTrunkRequest.php │ │ ├── CreateSIPOutboundTrunkRequest.php │ │ ├── BackupCodecPolicy.php │ │ ├── SipDTMF.php │ │ ├── VideoLayer │ │ └── Mode.php │ │ ├── IngressState │ │ └── Status.php │ │ ├── Codec.php │ │ ├── SubscribedAudioCodec.php │ │ ├── TimedVersion.php │ │ ├── UpdateLayoutRequest.php │ │ ├── DeleteAgentDispatchRequest.php │ │ ├── RoomAgentDispatch.php │ │ ├── WorkerPong.php │ │ ├── SIPStatus.php │ │ ├── EgressStatus.php │ │ ├── DataTrackExtensionParticipantSid.php │ │ ├── SIPCallStatus.php │ │ └── Pagination.php ├── Traits │ └── CaseConverter.php ├── RoomAgentDispatch.php └── SIPGrant.php ├── .gitignore ├── example.env ├── phpunit.xml ├── .github └── workflows │ └── ci.yml ├── composer.json └── .lando.yml /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "protocol"] 2 | path = protocol 3 | url = https://github.com/livekit/protocol 4 | branch = main 5 | -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitRoom.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitRoom.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitSip.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitSip.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitAgent.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitAgent.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitEgress.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitEgress.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitIngress.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitIngress.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitMetrics.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitMetrics.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitModels.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitModels.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitWebhook.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitWebhook.php -------------------------------------------------------------------------------- /src/proto/GPBMetadata/LivekitAgentDispatch.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agence104/livekit-server-sdk-php/HEAD/src/proto/GPBMetadata/LivekitAgentDispatch.php -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.phar 3 | composer.lock 4 | phpunit.phar 5 | phpunit.phar.asc 6 | .idea 7 | .env 8 | .phpunit.cache 9 | .phpunit.result.cache 10 | bin -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | LIVEKIT_URL=https://{YOUR-PROJECT}.livekit.cloud 2 | LIVEKIT_API_KEY={API_KEY} 3 | LIVEKIT_API_SECRET={API_SECRET} 4 | LIVEKIT_EGRESS_RTMP_URL=rtmp://a.rtmp.youtube.com/live2/{STREAM_KEY} 5 | LIVEKIT_EGRESS_RTMP_URL2=rtmp://live.twitch.tv/app/{STREAM_KEY} -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./tests/ 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/proto/Livekit/ClientInfo_SDK.php: -------------------------------------------------------------------------------- 1 | internalAddGeneratedFile( 18 | ' 19 | v 20 | logger/options.protologger google/protobuf/descriptor.protoB,Z*github.com/livekit/protocol/livekit/loggerbproto3' 21 | , true); 22 | 23 | static::$is_initialized = true; 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataStream.php: -------------------------------------------------------------------------------- 1 | livekit.DataStream 13 | */ 14 | class DataStream extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitModels::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/Encryption.php: -------------------------------------------------------------------------------- 1 | livekit.Encryption 13 | */ 14 | class Encryption extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitModels::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteRoomResponse.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteRoomResponse 13 | */ 14 | class DeleteRoomResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitRoom::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/SendDataResponse.php: -------------------------------------------------------------------------------- 1 | livekit.SendDataResponse 14 | */ 15 | class SendDataResponse extends \Google\Protobuf\Internal\Message 16 | { 17 | 18 | /** 19 | * Constructor. 20 | * 21 | * @param array $data { 22 | * Optional. Data for populating the Message object. 23 | * 24 | * } 25 | */ 26 | public function __construct($data = NULL) { 27 | \GPBMetadata\LivekitRoom::initOnce(); 28 | parent::__construct($data); 29 | } 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/proto/Livekit/MoveParticipantResponse.php: -------------------------------------------------------------------------------- 1 | livekit.MoveParticipantResponse 13 | */ 14 | class MoveParticipantResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitRoom::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ master, main ] 6 | pull_request: 7 | branches: [ master, main ] 8 | 9 | jobs: 10 | tests: 11 | name: PHP ${{ matrix.php }} - ${{ matrix.stability }} 12 | runs-on: ubuntu-latest 13 | strategy: 14 | fail-fast: true 15 | matrix: 16 | php: ['8.1', '8.2', '8.3', '8.4'] 17 | stability: [prefer-lowest, prefer-stable] 18 | 19 | steps: 20 | - name: Checkout Code 21 | uses: actions/checkout@v4 22 | 23 | - name: Setup PHP 24 | uses: shivammathur/setup-php@v2 25 | with: 26 | php-version: ${{ matrix.php }} 27 | tools: composer:v2, parallel-lint 28 | coverage: none 29 | 30 | - name: Lint PHP files 31 | run: parallel-lint --show-deprecated --exclude src/proto src/ tests/ 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/ForwardParticipantResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ForwardParticipantResponse 13 | */ 14 | class ForwardParticipantResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitRoom::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/RemoveParticipantResponse.php: -------------------------------------------------------------------------------- 1 | livekit.RemoveParticipantResponse 13 | */ 14 | class RemoveParticipantResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | 17 | /** 18 | * Constructor. 19 | * 20 | * @param array $data { 21 | * Optional. Data for populating the Message object. 22 | * 23 | * } 24 | */ 25 | public function __construct($data = NULL) { 26 | \GPBMetadata\LivekitRoom::initOnce(); 27 | parent::__construct($data); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/proto/Livekit/UpdateSubscriptionsResponse.php: -------------------------------------------------------------------------------- 1 | livekit.UpdateSubscriptionsResponse 15 | */ 16 | class UpdateSubscriptionsResponse extends \Google\Protobuf\Internal\Message 17 | { 18 | 19 | /** 20 | * Constructor. 21 | * 22 | * @param array $data { 23 | * Optional. Data for populating the Message object. 24 | * 25 | * } 26 | */ 27 | public function __construct($data = NULL) { 28 | \GPBMetadata\LivekitRoom::initOnce(); 29 | parent::__construct($data); 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "agence104/livekit-server-sdk", 3 | "description": "Server-side SDK for LiveKit.", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.3.4", 7 | "authors": [ 8 | { 9 | "name": "Agence 10-4", 10 | "homepage": "https://www.agence104.com" 11 | } 12 | ], 13 | "require": { 14 | "php": "^8.1", 15 | "firebase/php-jwt": "^6.8", 16 | "twirp/twirp": "^0.9.1|^0.14.0", 17 | "google/protobuf": "^3.23|^4.0", 18 | "guzzlehttp/guzzle": "^6.3|^7.0", 19 | "guzzlehttp/psr7": "^1.6.1|^2.0" 20 | }, 21 | "autoload": { 22 | "psr-4": { 23 | "Agence104\\LiveKit\\": "src", 24 | "GPBMetadata\\": "src/proto/GPBMetadata", 25 | "Livekit\\": "src/proto/Livekit" 26 | } 27 | }, 28 | "require-dev": { 29 | "phpunit/phpunit": "^9.0", 30 | "squizlabs/php_codesniffer": "^3.7" 31 | }, 32 | "config": { 33 | "allow-plugins": { 34 | "php-http/discovery": true 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/proto/Livekit/AgentDispatchService.php: -------------------------------------------------------------------------------- 1 | livekit.AgentDispatchService 13 | */ 14 | interface AgentDispatchService 15 | { 16 | /** 17 | * 18 | * 19 | * Generated from protobuf method livekit.AgentDispatchService/CreateDispatch 20 | * 21 | * @throws \Twirp\Error 22 | */ 23 | public function CreateDispatch(array $ctx, \Livekit\CreateAgentDispatchRequest $req): \Livekit\AgentDispatch; 24 | 25 | /** 26 | * 27 | * 28 | * Generated from protobuf method livekit.AgentDispatchService/DeleteDispatch 29 | * 30 | * @throws \Twirp\Error 31 | */ 32 | public function DeleteDispatch(array $ctx, \Livekit\DeleteAgentDispatchRequest $req): \Livekit\AgentDispatch; 33 | 34 | /** 35 | * 36 | * 37 | * Generated from protobuf method livekit.AgentDispatchService/ListDispatch 38 | * 39 | * @throws \Twirp\Error 40 | */ 41 | public function ListDispatch(array $ctx, \Livekit\ListAgentDispatchRequest $req): \Livekit\ListAgentDispatchResponse; 42 | } 43 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPFeature.php: -------------------------------------------------------------------------------- 1 | livekit.SIPFeature 11 | */ 12 | class SIPFeature 13 | { 14 | /** 15 | * Generated from protobuf enum NONE = 0; 16 | */ 17 | const NONE = 0; 18 | /** 19 | * Generated from protobuf enum KRISP_ENABLED = 1; 20 | */ 21 | const KRISP_ENABLED = 1; 22 | 23 | private static $valueToName = [ 24 | self::NONE => 'NONE', 25 | self::KRISP_ENABLED => 'KRISP_ENABLED', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/ImageCodec.php: -------------------------------------------------------------------------------- 1 | livekit.ImageCodec 11 | */ 12 | class ImageCodec 13 | { 14 | /** 15 | * Generated from protobuf enum IC_DEFAULT = 0; 16 | */ 17 | const IC_DEFAULT = 0; 18 | /** 19 | * Generated from protobuf enum IC_JPEG = 1; 20 | */ 21 | const IC_JPEG = 1; 22 | 23 | private static $valueToName = [ 24 | self::IC_DEFAULT => 'IC_DEFAULT', 25 | self::IC_JPEG => 'IC_JPEG', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/SegmentedFileSuffix.php: -------------------------------------------------------------------------------- 1 | livekit.SegmentedFileSuffix 11 | */ 12 | class SegmentedFileSuffix 13 | { 14 | /** 15 | * Generated from protobuf enum INDEX = 0; 16 | */ 17 | const INDEX = 0; 18 | /** 19 | * Generated from protobuf enum TIMESTAMP = 1; 20 | */ 21 | const TIMESTAMP = 1; 22 | 23 | private static $valueToName = [ 24 | self::INDEX => 'INDEX', 25 | self::TIMESTAMP => 'TIMESTAMP', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/WorkerStatus.php: -------------------------------------------------------------------------------- 1 | livekit.WorkerStatus 11 | */ 12 | class WorkerStatus 13 | { 14 | /** 15 | * Generated from protobuf enum WS_AVAILABLE = 0; 16 | */ 17 | const WS_AVAILABLE = 0; 18 | /** 19 | * Generated from protobuf enum WS_FULL = 1; 20 | */ 21 | const WS_FULL = 1; 22 | 23 | private static $valueToName = [ 24 | self::WS_AVAILABLE => 'WS_AVAILABLE', 25 | self::WS_FULL => 'WS_FULL', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataTrackExtensionID.php: -------------------------------------------------------------------------------- 1 | livekit.DataTrackExtensionID 11 | */ 12 | class DataTrackExtensionID 13 | { 14 | /** 15 | * Generated from protobuf enum DTEI_INVALID = 0; 16 | */ 17 | const DTEI_INVALID = 0; 18 | /** 19 | * Generated from protobuf enum DTEI_PARTICIPANT_SID = 1; 20 | */ 21 | const DTEI_PARTICIPANT_SID = 1; 22 | 23 | private static $valueToName = [ 24 | self::DTEI_INVALID => 'DTEI_INVALID', 25 | self::DTEI_PARTICIPANT_SID => 'DTEI_PARTICIPANT_SID', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPClient.php: -------------------------------------------------------------------------------- 1 | livekit.SIP 17 | */ 18 | final class SIPClient extends SIPAbstractClient implements SIP 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/protobuf'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal proto response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPJsonClient.php: -------------------------------------------------------------------------------- 1 | livekit.SIP 17 | */ 18 | final class SIPJsonClient extends SIPAbstractClient implements SIP 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToJsonString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/json'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromJsonString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal json response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/TrackType.php: -------------------------------------------------------------------------------- 1 | livekit.TrackType 11 | */ 12 | class TrackType 13 | { 14 | /** 15 | * Generated from protobuf enum AUDIO = 0; 16 | */ 17 | const AUDIO = 0; 18 | /** 19 | * Generated from protobuf enum VIDEO = 1; 20 | */ 21 | const VIDEO = 1; 22 | /** 23 | * Generated from protobuf enum DATA = 2; 24 | */ 25 | const DATA = 2; 26 | 27 | private static $valueToName = [ 28 | self::AUDIO => 'AUDIO', 29 | self::VIDEO => 'VIDEO', 30 | self::DATA => 'DATA', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/EgressSourceType.php: -------------------------------------------------------------------------------- 1 | livekit.EgressSourceType 11 | */ 12 | class EgressSourceType 13 | { 14 | /** 15 | * Generated from protobuf enum EGRESS_SOURCE_TYPE_WEB = 0; 16 | */ 17 | const EGRESS_SOURCE_TYPE_WEB = 0; 18 | /** 19 | * Generated from protobuf enum EGRESS_SOURCE_TYPE_SDK = 1; 20 | */ 21 | const EGRESS_SOURCE_TYPE_SDK = 1; 22 | 23 | private static $valueToName = [ 24 | self::EGRESS_SOURCE_TYPE_WEB => 'EGRESS_SOURCE_TYPE_WEB', 25 | self::EGRESS_SOURCE_TYPE_SDK => 'EGRESS_SOURCE_TYPE_SDK', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/EgressClient.php: -------------------------------------------------------------------------------- 1 | livekit.Egress 17 | */ 18 | final class EgressClient extends EgressAbstractClient implements Egress 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/protobuf'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal proto response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/EgressJsonClient.php: -------------------------------------------------------------------------------- 1 | livekit.Egress 17 | */ 18 | final class EgressJsonClient extends EgressAbstractClient implements Egress 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToJsonString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/json'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromJsonString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal json response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/IngressClient.php: -------------------------------------------------------------------------------- 1 | livekit.Ingress 17 | */ 18 | final class IngressClient extends IngressAbstractClient implements Ingress 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/protobuf'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal proto response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/SegmentedFileProtocol.php: -------------------------------------------------------------------------------- 1 | livekit.SegmentedFileProtocol 11 | */ 12 | class SegmentedFileProtocol 13 | { 14 | /** 15 | * Generated from protobuf enum DEFAULT_SEGMENTED_FILE_PROTOCOL = 0; 16 | */ 17 | const DEFAULT_SEGMENTED_FILE_PROTOCOL = 0; 18 | /** 19 | * Generated from protobuf enum HLS_PROTOCOL = 1; 20 | */ 21 | const HLS_PROTOCOL = 1; 22 | 23 | private static $valueToName = [ 24 | self::DEFAULT_SEGMENTED_FILE_PROTOCOL => 'DEFAULT_SEGMENTED_FILE_PROTOCOL', 25 | self::HLS_PROTOCOL => 'HLS_PROTOCOL', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/proto/Livekit/IngressJsonClient.php: -------------------------------------------------------------------------------- 1 | livekit.Ingress 17 | */ 18 | final class IngressJsonClient extends IngressAbstractClient implements Ingress 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToJsonString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/json'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromJsonString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal json response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/TokenPagination.php: -------------------------------------------------------------------------------- 1 | livekit.TokenPagination 13 | */ 14 | class TokenPagination extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string token = 1; 18 | */ 19 | protected $token = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $token 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitModels::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string token = 1; 37 | * @return string 38 | */ 39 | public function getToken() 40 | { 41 | return $this->token; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string token = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setToken($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->token = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/JobTermination.php: -------------------------------------------------------------------------------- 1 | livekit.JobTermination 13 | */ 14 | class JobTermination extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string job_id = 1; 18 | */ 19 | protected $job_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $job_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitAgent::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string job_id = 1; 37 | * @return string 38 | */ 39 | public function getJobId() 40 | { 41 | return $this->job_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string job_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setJobId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->job_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataPacket/Kind.php: -------------------------------------------------------------------------------- 1 | livekit.DataPacket.Kind 11 | */ 12 | class Kind 13 | { 14 | /** 15 | * Generated from protobuf enum RELIABLE = 0; 16 | */ 17 | const RELIABLE = 0; 18 | /** 19 | * Generated from protobuf enum LOSSY = 1; 20 | */ 21 | const LOSSY = 1; 22 | 23 | private static $valueToName = [ 24 | self::RELIABLE => 'RELIABLE', 25 | self::LOSSY => 'LOSSY', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | // Adding a class alias for backwards compatibility with the previous class name. 50 | class_alias(Kind::class, \Livekit\DataPacket_Kind::class); 51 | 52 | -------------------------------------------------------------------------------- /src/proto/Livekit/RoomServiceClient.php: -------------------------------------------------------------------------------- 1 | livekit.RoomService 17 | */ 18 | final class RoomServiceClient extends RoomServiceAbstractClient implements RoomService 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/protobuf'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal proto response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/RoomServiceJsonClient.php: -------------------------------------------------------------------------------- 1 | livekit.RoomService 17 | */ 18 | final class RoomServiceJsonClient extends RoomServiceAbstractClient implements RoomService 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToJsonString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/json'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromJsonString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal json response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/RpcAck.php: -------------------------------------------------------------------------------- 1 | livekit.RpcAck 13 | */ 14 | class RpcAck extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string request_id = 1; 18 | */ 19 | protected $request_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $request_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitModels::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string request_id = 1; 37 | * @return string 38 | */ 39 | public function getRequestId() 40 | { 41 | return $this->request_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string request_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setRequestId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->request_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/WorkerPing.php: -------------------------------------------------------------------------------- 1 | livekit.WorkerPing 13 | */ 14 | class WorkerPing extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field int64 timestamp = 1; 18 | */ 19 | protected $timestamp = 0; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type int|string $timestamp 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitAgent::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field int64 timestamp = 1; 37 | * @return int|string 38 | */ 39 | public function getTimestamp() 40 | { 41 | return $this->timestamp; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field int64 timestamp = 1; 46 | * @param int|string $var 47 | * @return $this 48 | */ 49 | public function setTimestamp($var) 50 | { 51 | GPBUtil::checkInt64($var); 52 | $this->timestamp = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/PerformRpcResponse.php: -------------------------------------------------------------------------------- 1 | livekit.PerformRpcResponse 13 | */ 14 | class PerformRpcResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string payload = 1; 18 | */ 19 | protected $payload = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $payload 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitRoom::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string payload = 1; 37 | * @return string 38 | */ 39 | public function getPayload() 40 | { 41 | return $this->payload; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string payload = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setPayload($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->payload = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ServerInfo/Edition.php: -------------------------------------------------------------------------------- 1 | livekit.ServerInfo.Edition 11 | */ 12 | class Edition 13 | { 14 | /** 15 | * Generated from protobuf enum Standard = 0; 16 | */ 17 | const Standard = 0; 18 | /** 19 | * Generated from protobuf enum Cloud = 1; 20 | */ 21 | const Cloud = 1; 22 | 23 | private static $valueToName = [ 24 | self::Standard => 'Standard', 25 | self::Cloud => 'Cloud', 26 | ]; 27 | 28 | public static function name($value) 29 | { 30 | if (!isset(self::$valueToName[$value])) { 31 | throw new UnexpectedValueException(sprintf( 32 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 33 | } 34 | return self::$valueToName[$value]; 35 | } 36 | 37 | 38 | public static function value($name) 39 | { 40 | $const = __CLASS__ . '::' . strtoupper($name); 41 | if (!defined($const)) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 44 | } 45 | return constant($const); 46 | } 47 | } 48 | 49 | // Adding a class alias for backwards compatibility with the previous class name. 50 | class_alias(Edition::class, \Livekit\ServerInfo_Edition::class); 51 | 52 | -------------------------------------------------------------------------------- /src/proto/Livekit/ClientConfigSetting.php: -------------------------------------------------------------------------------- 1 | livekit.ClientConfigSetting 11 | */ 12 | class ClientConfigSetting 13 | { 14 | /** 15 | * Generated from protobuf enum UNSET = 0; 16 | */ 17 | const PBUNSET = 0; 18 | /** 19 | * Generated from protobuf enum DISABLED = 1; 20 | */ 21 | const DISABLED = 1; 22 | /** 23 | * Generated from protobuf enum ENABLED = 2; 24 | */ 25 | const ENABLED = 2; 26 | 27 | private static $valueToName = [ 28 | self::PBUNSET => 'PBUNSET', 29 | self::DISABLED => 'DISABLED', 30 | self::ENABLED => 'ENABLED', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/StopEgressRequest.php: -------------------------------------------------------------------------------- 1 | livekit.StopEgressRequest 13 | */ 14 | class StopEgressRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string egress_id = 1; 18 | */ 19 | protected $egress_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $egress_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitEgress::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string egress_id = 1; 37 | * @return string 38 | */ 39 | public function getEgressId() 40 | { 41 | return $this->egress_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string egress_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setEgressId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->egress_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/JobType.php: -------------------------------------------------------------------------------- 1 | livekit.JobType 11 | */ 12 | class JobType 13 | { 14 | /** 15 | * Generated from protobuf enum JT_ROOM = 0; 16 | */ 17 | const JT_ROOM = 0; 18 | /** 19 | * Generated from protobuf enum JT_PUBLISHER = 1; 20 | */ 21 | const JT_PUBLISHER = 1; 22 | /** 23 | * Generated from protobuf enum JT_PARTICIPANT = 2; 24 | */ 25 | const JT_PARTICIPANT = 2; 26 | 27 | private static $valueToName = [ 28 | self::JT_ROOM => 'JT_ROOM', 29 | self::JT_PUBLISHER => 'JT_PUBLISHER', 30 | self::JT_PARTICIPANT => 'JT_PARTICIPANT', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteIngressRequest.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteIngressRequest 13 | */ 14 | class DeleteIngressRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string ingress_id = 1; 18 | */ 19 | protected $ingress_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $ingress_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitIngress::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string ingress_id = 1; 37 | * @return string 38 | */ 39 | public function getIngressId() 40 | { 41 | return $this->ingress_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string ingress_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setIngressId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->ingress_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/IngressAudioEncodingPreset.php: -------------------------------------------------------------------------------- 1 | livekit.IngressAudioEncodingPreset 11 | */ 12 | class IngressAudioEncodingPreset 13 | { 14 | /** 15 | * OPUS, 2 channels, 96kbps 16 | * 17 | * Generated from protobuf enum OPUS_STEREO_96KBPS = 0; 18 | */ 19 | const OPUS_STEREO_96KBPS = 0; 20 | /** 21 | * OPUS, 1 channel, 64kbps 22 | * 23 | * Generated from protobuf enum OPUS_MONO_64KBS = 1; 24 | */ 25 | const OPUS_MONO_64KBS = 1; 26 | 27 | private static $valueToName = [ 28 | self::OPUS_STEREO_96KBPS => 'OPUS_STEREO_96KBPS', 29 | self::OPUS_MONO_64KBS => 'OPUS_MONO_64KBS', 30 | ]; 31 | 32 | public static function name($value) 33 | { 34 | if (!isset(self::$valueToName[$value])) { 35 | throw new UnexpectedValueException(sprintf( 36 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 37 | } 38 | return self::$valueToName[$value]; 39 | } 40 | 41 | 42 | public static function value($name) 43 | { 44 | $const = __CLASS__ . '::' . strtoupper($name); 45 | if (!defined($const)) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 48 | } 49 | return constant($const); 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteSIPTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteSIPTrunkRequest 13 | */ 14 | class DeleteSIPTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string sip_trunk_id = 1; 18 | */ 19 | protected $sip_trunk_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $sip_trunk_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string sip_trunk_id = 1; 37 | * @return string 38 | */ 39 | public function getSipTrunkId() 40 | { 41 | return $this->sip_trunk_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string sip_trunk_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setSipTrunkId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->sip_trunk_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPCallDirection.php: -------------------------------------------------------------------------------- 1 | livekit.SIPCallDirection 11 | */ 12 | class SIPCallDirection 13 | { 14 | /** 15 | * Generated from protobuf enum SCD_UNKNOWN = 0; 16 | */ 17 | const SCD_UNKNOWN = 0; 18 | /** 19 | * Generated from protobuf enum SCD_INBOUND = 1; 20 | */ 21 | const SCD_INBOUND = 1; 22 | /** 23 | * Generated from protobuf enum SCD_OUTBOUND = 2; 24 | */ 25 | const SCD_OUTBOUND = 2; 26 | 27 | private static $valueToName = [ 28 | self::SCD_UNKNOWN => 'SCD_UNKNOWN', 29 | self::SCD_INBOUND => 'SCD_INBOUND', 30 | self::SCD_OUTBOUND => 'SCD_OUTBOUND', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/AgentDispatchServiceClient.php: -------------------------------------------------------------------------------- 1 | livekit.AgentDispatchService 17 | */ 18 | final class AgentDispatchServiceClient extends AgentDispatchServiceAbstractClient implements AgentDispatchService 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/protobuf'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal proto response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/AgentDispatchServiceJsonClient.php: -------------------------------------------------------------------------------- 1 | livekit.AgentDispatchService 17 | */ 18 | final class AgentDispatchServiceJsonClient extends AgentDispatchServiceAbstractClient implements AgentDispatchService 19 | { 20 | /** 21 | * @inheritDoc 22 | */ 23 | protected function doRequest(array $ctx, string $url, Message $in, Message $out): void 24 | { 25 | $body = $in->serializeToJsonString(); 26 | 27 | $req = $this->newRequest($ctx, $url, $body, 'application/json'); 28 | 29 | try { 30 | $resp = $this->httpClient->sendRequest($req); 31 | } catch (\Throwable $e) { 32 | throw $this->clientError('failed to send request', $e); 33 | } 34 | 35 | if ($resp->getStatusCode() !== 200) { 36 | throw $this->errorFromResponse($resp); 37 | } 38 | 39 | try { 40 | $out->mergeFromJsonString((string)$resp->getBody()); 41 | } catch (GPBDecodeException $e) { 42 | throw $this->clientError('failed to unmarshal json response', $e); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/Livekit/StreamProtocol.php: -------------------------------------------------------------------------------- 1 | livekit.StreamProtocol 11 | */ 12 | class StreamProtocol 13 | { 14 | /** 15 | * protocol chosen based on urls 16 | * 17 | * Generated from protobuf enum DEFAULT_PROTOCOL = 0; 18 | */ 19 | const DEFAULT_PROTOCOL = 0; 20 | /** 21 | * Generated from protobuf enum RTMP = 1; 22 | */ 23 | const RTMP = 1; 24 | /** 25 | * Generated from protobuf enum SRT = 2; 26 | */ 27 | const SRT = 2; 28 | 29 | private static $valueToName = [ 30 | self::DEFAULT_PROTOCOL => 'DEFAULT_PROTOCOL', 31 | self::RTMP => 'RTMP', 32 | self::SRT => 'SRT', 33 | ]; 34 | 35 | public static function name($value) 36 | { 37 | if (!isset(self::$valueToName[$value])) { 38 | throw new UnexpectedValueException(sprintf( 39 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 40 | } 41 | return self::$valueToName[$value]; 42 | } 43 | 44 | 45 | public static function value($name) 46 | { 47 | $const = __CLASS__ . '::' . strtoupper($name); 48 | if (!defined($const)) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 51 | } 52 | return constant($const); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/proto/Livekit/GetSIPInboundTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.GetSIPInboundTrunkRequest 13 | */ 14 | class GetSIPInboundTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string sip_trunk_id = 1; 18 | */ 19 | protected $sip_trunk_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $sip_trunk_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string sip_trunk_id = 1; 37 | * @return string 38 | */ 39 | public function getSipTrunkId() 40 | { 41 | return $this->sip_trunk_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string sip_trunk_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setSipTrunkId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->sip_trunk_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/GetSIPOutboundTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.GetSIPOutboundTrunkRequest 13 | */ 14 | class GetSIPOutboundTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string sip_trunk_id = 1; 18 | */ 19 | protected $sip_trunk_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $sip_trunk_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string sip_trunk_id = 1; 37 | * @return string 38 | */ 39 | public function getSipTrunkId() 40 | { 41 | return $this->sip_trunk_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string sip_trunk_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setSipTrunkId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->sip_trunk_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/Ingress.php: -------------------------------------------------------------------------------- 1 | livekit.Ingress 13 | */ 14 | interface Ingress 15 | { 16 | /** 17 | * Create a new Ingress 18 | * 19 | * Generated from protobuf method livekit.Ingress/CreateIngress 20 | * 21 | * @throws \Twirp\Error 22 | */ 23 | public function CreateIngress(array $ctx, \Livekit\CreateIngressRequest $req): \Livekit\IngressInfo; 24 | 25 | /** 26 | * Update an existing Ingress. Ingress can only be updated when it's in ENDPOINT_WAITING state. 27 | * 28 | * Generated from protobuf method livekit.Ingress/UpdateIngress 29 | * 30 | * @throws \Twirp\Error 31 | */ 32 | public function UpdateIngress(array $ctx, \Livekit\UpdateIngressRequest $req): \Livekit\IngressInfo; 33 | 34 | /** 35 | * 36 | * 37 | * Generated from protobuf method livekit.Ingress/ListIngress 38 | * 39 | * @throws \Twirp\Error 40 | */ 41 | public function ListIngress(array $ctx, \Livekit\ListIngressRequest $req): \Livekit\ListIngressResponse; 42 | 43 | /** 44 | * 45 | * 46 | * Generated from protobuf method livekit.Ingress/DeleteIngress 47 | * 48 | * @throws \Twirp\Error 49 | */ 50 | public function DeleteIngress(array $ctx, \Livekit\DeleteIngressRequest $req): \Livekit\IngressInfo; 51 | } 52 | -------------------------------------------------------------------------------- /src/proto/Livekit/VideoQuality.php: -------------------------------------------------------------------------------- 1 | livekit.VideoQuality 11 | */ 12 | class VideoQuality 13 | { 14 | /** 15 | * Generated from protobuf enum LOW = 0; 16 | */ 17 | const LOW = 0; 18 | /** 19 | * Generated from protobuf enum MEDIUM = 1; 20 | */ 21 | const MEDIUM = 1; 22 | /** 23 | * Generated from protobuf enum HIGH = 2; 24 | */ 25 | const HIGH = 2; 26 | /** 27 | * Generated from protobuf enum OFF = 3; 28 | */ 29 | const OFF = 3; 30 | 31 | private static $valueToName = [ 32 | self::LOW => 'LOW', 33 | self::MEDIUM => 'MEDIUM', 34 | self::HIGH => 'HIGH', 35 | self::OFF => 'OFF', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SubscriptionError.php: -------------------------------------------------------------------------------- 1 | livekit.SubscriptionError 11 | */ 12 | class SubscriptionError 13 | { 14 | /** 15 | * Generated from protobuf enum SE_UNKNOWN = 0; 16 | */ 17 | const SE_UNKNOWN = 0; 18 | /** 19 | * Generated from protobuf enum SE_CODEC_UNSUPPORTED = 1; 20 | */ 21 | const SE_CODEC_UNSUPPORTED = 1; 22 | /** 23 | * Generated from protobuf enum SE_TRACK_NOTFOUND = 2; 24 | */ 25 | const SE_TRACK_NOTFOUND = 2; 26 | 27 | private static $valueToName = [ 28 | self::SE_UNKNOWN => 'SE_UNKNOWN', 29 | self::SE_CODEC_UNSUPPORTED => 'SE_CODEC_UNSUPPORTED', 30 | self::SE_TRACK_NOTFOUND => 'SE_TRACK_NOTFOUND', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/AudioCodec.php: -------------------------------------------------------------------------------- 1 | livekit.AudioCodec 11 | */ 12 | class AudioCodec 13 | { 14 | /** 15 | * Generated from protobuf enum DEFAULT_AC = 0; 16 | */ 17 | const DEFAULT_AC = 0; 18 | /** 19 | * Generated from protobuf enum OPUS = 1; 20 | */ 21 | const OPUS = 1; 22 | /** 23 | * Generated from protobuf enum AAC = 2; 24 | */ 25 | const AAC = 2; 26 | /** 27 | * Generated from protobuf enum AC_MP3 = 3; 28 | */ 29 | const AC_MP3 = 3; 30 | 31 | private static $valueToName = [ 32 | self::DEFAULT_AC => 'DEFAULT_AC', 33 | self::OPUS => 'OPUS', 34 | self::AAC => 'AAC', 35 | self::AC_MP3 => 'AC_MP3', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/Encryption/Type.php: -------------------------------------------------------------------------------- 1 | livekit.Encryption.Type 11 | */ 12 | class Type 13 | { 14 | /** 15 | * Generated from protobuf enum NONE = 0; 16 | */ 17 | const NONE = 0; 18 | /** 19 | * Generated from protobuf enum GCM = 1; 20 | */ 21 | const GCM = 1; 22 | /** 23 | * Generated from protobuf enum CUSTOM = 2; 24 | */ 25 | const CUSTOM = 2; 26 | 27 | private static $valueToName = [ 28 | self::NONE => 'NONE', 29 | self::GCM => 'GCM', 30 | self::CUSTOM => 'CUSTOM', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | // Adding a class alias for backwards compatibility with the previous class name. 55 | class_alias(Type::class, \Livekit\Encryption_Type::class); 56 | 57 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteRoomRequest.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteRoomRequest 13 | */ 14 | class DeleteRoomRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * name of the room 18 | * 19 | * Generated from protobuf field string room = 1; 20 | */ 21 | protected $room = ''; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type string $room 30 | * name of the room 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitRoom::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * name of the room 40 | * 41 | * Generated from protobuf field string room = 1; 42 | * @return string 43 | */ 44 | public function getRoom() 45 | { 46 | return $this->room; 47 | } 48 | 49 | /** 50 | * name of the room 51 | * 52 | * Generated from protobuf field string room = 1; 53 | * @param string $var 54 | * @return $this 55 | */ 56 | public function setRoom($var) 57 | { 58 | GPBUtil::checkString($var, True); 59 | $this->room = $var; 60 | 61 | return $this; 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/proto/Livekit/ConnectionQuality.php: -------------------------------------------------------------------------------- 1 | livekit.ConnectionQuality 11 | */ 12 | class ConnectionQuality 13 | { 14 | /** 15 | * Generated from protobuf enum POOR = 0; 16 | */ 17 | const POOR = 0; 18 | /** 19 | * Generated from protobuf enum GOOD = 1; 20 | */ 21 | const GOOD = 1; 22 | /** 23 | * Generated from protobuf enum EXCELLENT = 2; 24 | */ 25 | const EXCELLENT = 2; 26 | /** 27 | * Generated from protobuf enum LOST = 3; 28 | */ 29 | const LOST = 3; 30 | 31 | private static $valueToName = [ 32 | self::POOR => 'POOR', 33 | self::GOOD => 'GOOD', 34 | self::EXCELLENT => 'EXCELLENT', 35 | self::LOST => 'LOST', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteSIPDispatchRuleRequest.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteSIPDispatchRuleRequest 13 | */ 14 | class DeleteSIPDispatchRuleRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string sip_dispatch_rule_id = 1; 18 | */ 19 | protected $sip_dispatch_rule_id = ''; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type string $sip_dispatch_rule_id 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field string sip_dispatch_rule_id = 1; 37 | * @return string 38 | */ 39 | public function getSipDispatchRuleId() 40 | { 41 | return $this->sip_dispatch_rule_id; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field string sip_dispatch_rule_id = 1; 46 | * @param string $var 47 | * @return $this 48 | */ 49 | public function setSipDispatchRuleId($var) 50 | { 51 | GPBUtil::checkString($var, True); 52 | $this->sip_dispatch_rule_id = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/IngressInput.php: -------------------------------------------------------------------------------- 1 | livekit.IngressInput 11 | */ 12 | class IngressInput 13 | { 14 | /** 15 | * Generated from protobuf enum RTMP_INPUT = 0; 16 | */ 17 | const RTMP_INPUT = 0; 18 | /** 19 | * Generated from protobuf enum WHIP_INPUT = 1; 20 | */ 21 | const WHIP_INPUT = 1; 22 | /** 23 | * Pull from the provided URL. Only HTTP url are supported, serving either a single media file or a HLS stream 24 | * 25 | * Generated from protobuf enum URL_INPUT = 2; 26 | */ 27 | const URL_INPUT = 2; 28 | 29 | private static $valueToName = [ 30 | self::RTMP_INPUT => 'RTMP_INPUT', 31 | self::WHIP_INPUT => 'WHIP_INPUT', 32 | self::URL_INPUT => 'URL_INPUT', 33 | ]; 34 | 35 | public static function name($value) 36 | { 37 | if (!isset(self::$valueToName[$value])) { 38 | throw new UnexpectedValueException(sprintf( 39 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 40 | } 41 | return self::$valueToName[$value]; 42 | } 43 | 44 | 45 | public static function value($name) 46 | { 47 | $const = __CLASS__ . '::' . strtoupper($name); 48 | if (!defined($const)) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 51 | } 52 | return constant($const); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListParticipantsRequest.php: -------------------------------------------------------------------------------- 1 | livekit.ListParticipantsRequest 13 | */ 14 | class ListParticipantsRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * name of the room 18 | * 19 | * Generated from protobuf field string room = 1; 20 | */ 21 | protected $room = ''; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type string $room 30 | * name of the room 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitRoom::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * name of the room 40 | * 41 | * Generated from protobuf field string room = 1; 42 | * @return string 43 | */ 44 | public function getRoom() 45 | { 46 | return $this->room; 47 | } 48 | 49 | /** 50 | * name of the room 51 | * 52 | * Generated from protobuf field string room = 1; 53 | * @param string $var 54 | * @return $this 55 | */ 56 | public function setRoom($var) 57 | { 58 | GPBUtil::checkString($var, True); 59 | $this->room = $var; 60 | 61 | return $this; 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPTransferStatus.php: -------------------------------------------------------------------------------- 1 | livekit.SIPTransferStatus 11 | */ 12 | class SIPTransferStatus 13 | { 14 | /** 15 | * Generated from protobuf enum STS_TRANSFER_ONGOING = 0; 16 | */ 17 | const STS_TRANSFER_ONGOING = 0; 18 | /** 19 | * Generated from protobuf enum STS_TRANSFER_FAILED = 1; 20 | */ 21 | const STS_TRANSFER_FAILED = 1; 22 | /** 23 | * Generated from protobuf enum STS_TRANSFER_SUCCESSFUL = 2; 24 | */ 25 | const STS_TRANSFER_SUCCESSFUL = 2; 26 | 27 | private static $valueToName = [ 28 | self::STS_TRANSFER_ONGOING => 'STS_TRANSFER_ONGOING', 29 | self::STS_TRANSFER_FAILED => 'STS_TRANSFER_FAILED', 30 | self::STS_TRANSFER_SUCCESSFUL => 'STS_TRANSFER_SUCCESSFUL', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/StreamInfo/Status.php: -------------------------------------------------------------------------------- 1 | livekit.StreamInfo.Status 11 | */ 12 | class Status 13 | { 14 | /** 15 | * Generated from protobuf enum ACTIVE = 0; 16 | */ 17 | const ACTIVE = 0; 18 | /** 19 | * Generated from protobuf enum FINISHED = 1; 20 | */ 21 | const FINISHED = 1; 22 | /** 23 | * Generated from protobuf enum FAILED = 2; 24 | */ 25 | const FAILED = 2; 26 | 27 | private static $valueToName = [ 28 | self::ACTIVE => 'ACTIVE', 29 | self::FINISHED => 'FINISHED', 30 | self::FAILED => 'FAILED', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | // Adding a class alias for backwards compatibility with the previous class name. 55 | class_alias(Status::class, \Livekit\StreamInfo_Status::class); 56 | 57 | -------------------------------------------------------------------------------- /.lando.yml: -------------------------------------------------------------------------------- 1 | name: livekit-server-sdk-php 2 | env_file: 3 | - .env 4 | services: 5 | appserver: 6 | api: 3 7 | type: lando 8 | services: 9 | image: php:8.1-apache 10 | command: docker-php-entrypoint apache2-foreground 11 | build_as_root: 12 | - apt-get update && apt-get install -y jq 13 | - curl -sSL https://get.livekit.io/cli | bash 14 | overrides: 15 | environment: 16 | # Support debugging CLI with Xdebug. 17 | PHP_IDE_CONFIG: "serverName=appserver" 18 | XDEBUG_SESSION_START: lando 19 | tooling: 20 | test: 21 | service: appserver 22 | cmd: 23 | - vendor/bin/phpunit --testdox 24 | xdebug-on: 25 | service: appserver 26 | description: Enable Xdebug. 27 | user: root 28 | cmd: 29 | - docker-php-ext-enable xdebug && kill -USR2 $(pgrep -o php-fpm) > /dev/null || /etc/init.d/apache2 reload 30 | - tput setaf 2 && echo "Xdebug On" && tput sgr 0 && echo 31 | xdebug-off: 32 | service: appserver 33 | description: Disable Xdebug. 34 | user: root 35 | cmd: 36 | - rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && kill -USR2 $(pgrep -o php-fpm) > /dev/null || /etc/init.d/apache2 reload 37 | - tput setaf 1 && echo "Xdebug Off" && tput sgr 0 && echo 38 | lk: 39 | service: appserver 40 | cmd: 41 | - lk 42 | create-test-room: 43 | service: appserver 44 | cmd: 45 | - lk room create testRoomParticipants 46 | delete-test-room: 47 | service: appserver 48 | cmd: 49 | - lk room delete testRoomParticipants 50 | start-test-users: 51 | service: appserver 52 | cmd: 53 | - lk load-test --room testRoomParticipants --video-publishers 3 --audio-publishers 5 54 | -------------------------------------------------------------------------------- /src/proto/Livekit/VideoConfiguration.php: -------------------------------------------------------------------------------- 1 | livekit.VideoConfiguration 13 | */ 14 | class VideoConfiguration extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.ClientConfigSetting hardware_encoder = 1; 18 | */ 19 | protected $hardware_encoder = 0; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type int $hardware_encoder 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitModels::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field .livekit.ClientConfigSetting hardware_encoder = 1; 37 | * @return int 38 | */ 39 | public function getHardwareEncoder() 40 | { 41 | return $this->hardware_encoder; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field .livekit.ClientConfigSetting hardware_encoder = 1; 46 | * @param int $var 47 | * @return $this 48 | */ 49 | public function setHardwareEncoder($var) 50 | { 51 | GPBUtil::checkEnum($var, \Livekit\ClientConfigSetting::class); 52 | $this->hardware_encoder = $var; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/JobStatus.php: -------------------------------------------------------------------------------- 1 | livekit.JobStatus 11 | */ 12 | class JobStatus 13 | { 14 | /** 15 | * Generated from protobuf enum JS_PENDING = 0; 16 | */ 17 | const JS_PENDING = 0; 18 | /** 19 | * Generated from protobuf enum JS_RUNNING = 1; 20 | */ 21 | const JS_RUNNING = 1; 22 | /** 23 | * Generated from protobuf enum JS_SUCCESS = 2; 24 | */ 25 | const JS_SUCCESS = 2; 26 | /** 27 | * Generated from protobuf enum JS_FAILED = 3; 28 | */ 29 | const JS_FAILED = 3; 30 | 31 | private static $valueToName = [ 32 | self::JS_PENDING => 'JS_PENDING', 33 | self::JS_RUNNING => 'JS_RUNNING', 34 | self::JS_SUCCESS => 'JS_SUCCESS', 35 | self::JS_FAILED => 'JS_FAILED', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/EncodedFileType.php: -------------------------------------------------------------------------------- 1 | livekit.EncodedFileType 11 | */ 12 | class EncodedFileType 13 | { 14 | /** 15 | * file type chosen based on codecs 16 | * 17 | * Generated from protobuf enum DEFAULT_FILETYPE = 0; 18 | */ 19 | const DEFAULT_FILETYPE = 0; 20 | /** 21 | * Generated from protobuf enum MP4 = 1; 22 | */ 23 | const MP4 = 1; 24 | /** 25 | * Generated from protobuf enum OGG = 2; 26 | */ 27 | const OGG = 2; 28 | /** 29 | * Generated from protobuf enum MP3 = 3; 30 | */ 31 | const MP3 = 3; 32 | 33 | private static $valueToName = [ 34 | self::DEFAULT_FILETYPE => 'DEFAULT_FILETYPE', 35 | self::MP4 => 'MP4', 36 | self::OGG => 'OGG', 37 | self::MP3 => 'MP3', 38 | ]; 39 | 40 | public static function name($value) 41 | { 42 | if (!isset(self::$valueToName[$value])) { 43 | throw new UnexpectedValueException(sprintf( 44 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 45 | } 46 | return self::$valueToName[$value]; 47 | } 48 | 49 | 50 | public static function value($name) 51 | { 52 | $const = __CLASS__ . '::' . strtoupper($name); 53 | if (!defined($const)) { 54 | throw new UnexpectedValueException(sprintf( 55 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 56 | } 57 | return constant($const); 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataStream/ByteHeader.php: -------------------------------------------------------------------------------- 1 | livekit.DataStream.ByteHeader 15 | */ 16 | class ByteHeader extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Generated from protobuf field string name = 1; 20 | */ 21 | protected $name = ''; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type string $name 30 | * } 31 | */ 32 | public function __construct($data = NULL) { 33 | \GPBMetadata\LivekitModels::initOnce(); 34 | parent::__construct($data); 35 | } 36 | 37 | /** 38 | * Generated from protobuf field string name = 1; 39 | * @return string 40 | */ 41 | public function getName() 42 | { 43 | return $this->name; 44 | } 45 | 46 | /** 47 | * Generated from protobuf field string name = 1; 48 | * @param string $var 49 | * @return $this 50 | */ 51 | public function setName($var) 52 | { 53 | GPBUtil::checkString($var, True); 54 | $this->name = $var; 55 | 56 | return $this; 57 | } 58 | 59 | } 60 | 61 | // Adding a class alias for backwards compatibility with the previous class name. 62 | class_alias(ByteHeader::class, \Livekit\DataStream_ByteHeader::class); 63 | 64 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListRoomsResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListRoomsResponse 13 | */ 14 | class ListRoomsResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.Room rooms = 1; 18 | */ 19 | private $rooms; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\Room[]|\Google\Protobuf\Internal\RepeatedField $rooms 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitRoom::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.Room rooms = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getRooms() 40 | { 41 | return $this->rooms; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.Room rooms = 1; 46 | * @param \Livekit\Room[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setRooms($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\Room::class); 52 | $this->rooms = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ProviderType.php: -------------------------------------------------------------------------------- 1 | livekit.ProviderType 11 | */ 12 | class ProviderType 13 | { 14 | /** 15 | * Generated from protobuf enum PROVIDER_TYPE_UNKNOWN = 0; 16 | */ 17 | const PROVIDER_TYPE_UNKNOWN = 0; 18 | /** 19 | * Internally implemented 20 | * 21 | * Generated from protobuf enum PROVIDER_TYPE_INTERNAL = 1; 22 | */ 23 | const PROVIDER_TYPE_INTERNAL = 1; 24 | /** 25 | * Vendor provided 26 | * 27 | * Generated from protobuf enum PROVIDER_TYPE_EXTERNAL = 2; 28 | */ 29 | const PROVIDER_TYPE_EXTERNAL = 2; 30 | 31 | private static $valueToName = [ 32 | self::PROVIDER_TYPE_UNKNOWN => 'PROVIDER_TYPE_UNKNOWN', 33 | self::PROVIDER_TYPE_INTERNAL => 'PROVIDER_TYPE_INTERNAL', 34 | self::PROVIDER_TYPE_EXTERNAL => 'PROVIDER_TYPE_EXTERNAL', 35 | ]; 36 | 37 | public static function name($value) 38 | { 39 | if (!isset(self::$valueToName[$value])) { 40 | throw new UnexpectedValueException(sprintf( 41 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 42 | } 43 | return self::$valueToName[$value]; 44 | } 45 | 46 | 47 | public static function value($name) 48 | { 49 | $const = __CLASS__ . '::' . strtoupper($name); 50 | if (!defined($const)) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 53 | } 54 | return constant($const); 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/proto/Livekit/StreamInfoList.php: -------------------------------------------------------------------------------- 1 | livekit.StreamInfoList 13 | */ 14 | class StreamInfoList extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.StreamInfo info = 1; 18 | */ 19 | private $info; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\StreamInfo[]|\Google\Protobuf\Internal\RepeatedField $info 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitEgress::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.StreamInfo info = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getInfo() 40 | { 41 | return $this->info; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.StreamInfo info = 1; 46 | * @param \Livekit\StreamInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setInfo($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\StreamInfo::class); 52 | $this->info = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPTrunkInfo/TrunkKind.php: -------------------------------------------------------------------------------- 1 | livekit.SIPTrunkInfo.TrunkKind 11 | */ 12 | class TrunkKind 13 | { 14 | /** 15 | * Generated from protobuf enum TRUNK_LEGACY = 0; 16 | */ 17 | const TRUNK_LEGACY = 0; 18 | /** 19 | * Generated from protobuf enum TRUNK_INBOUND = 1; 20 | */ 21 | const TRUNK_INBOUND = 1; 22 | /** 23 | * Generated from protobuf enum TRUNK_OUTBOUND = 2; 24 | */ 25 | const TRUNK_OUTBOUND = 2; 26 | 27 | private static $valueToName = [ 28 | self::TRUNK_LEGACY => 'TRUNK_LEGACY', 29 | self::TRUNK_INBOUND => 'TRUNK_INBOUND', 30 | self::TRUNK_OUTBOUND => 'TRUNK_OUTBOUND', 31 | ]; 32 | 33 | public static function name($value) 34 | { 35 | if (!isset(self::$valueToName[$value])) { 36 | throw new UnexpectedValueException(sprintf( 37 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 38 | } 39 | return self::$valueToName[$value]; 40 | } 41 | 42 | 43 | public static function value($name) 44 | { 45 | $const = __CLASS__ . '::' . strtoupper($name); 46 | if (!defined($const)) { 47 | throw new UnexpectedValueException(sprintf( 48 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 49 | } 50 | return constant($const); 51 | } 52 | } 53 | 54 | // Adding a class alias for backwards compatibility with the previous class name. 55 | class_alias(TrunkKind::class, \Livekit\SIPTrunkInfo_TrunkKind::class); 56 | 57 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListEgressResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListEgressResponse 13 | */ 14 | class ListEgressResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.EgressInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\EgressInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitEgress::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.EgressInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.EgressInfo items = 1; 46 | * @param \Livekit\EgressInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\EgressInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ImageFileSuffix.php: -------------------------------------------------------------------------------- 1 | livekit.ImageFileSuffix 11 | */ 12 | class ImageFileSuffix 13 | { 14 | /** 15 | * Generated from protobuf enum IMAGE_SUFFIX_INDEX = 0; 16 | */ 17 | const IMAGE_SUFFIX_INDEX = 0; 18 | /** 19 | * Generated from protobuf enum IMAGE_SUFFIX_TIMESTAMP = 1; 20 | */ 21 | const IMAGE_SUFFIX_TIMESTAMP = 1; 22 | /** 23 | * Do not append any suffix and overwrite the existing image with the latest 24 | * 25 | * Generated from protobuf enum IMAGE_SUFFIX_NONE_OVERWRITE = 2; 26 | */ 27 | const IMAGE_SUFFIX_NONE_OVERWRITE = 2; 28 | 29 | private static $valueToName = [ 30 | self::IMAGE_SUFFIX_INDEX => 'IMAGE_SUFFIX_INDEX', 31 | self::IMAGE_SUFFIX_TIMESTAMP => 'IMAGE_SUFFIX_TIMESTAMP', 32 | self::IMAGE_SUFFIX_NONE_OVERWRITE => 'IMAGE_SUFFIX_NONE_OVERWRITE', 33 | ]; 34 | 35 | public static function name($value) 36 | { 37 | if (!isset(self::$valueToName[$value])) { 38 | throw new UnexpectedValueException(sprintf( 39 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 40 | } 41 | return self::$valueToName[$value]; 42 | } 43 | 44 | 45 | public static function value($name) 46 | { 47 | $const = __CLASS__ . '::' . strtoupper($name); 48 | if (!defined($const)) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 51 | } 52 | return constant($const); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListIngressResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListIngressResponse 13 | */ 14 | class ListIngressResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.IngressInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\IngressInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitIngress::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.IngressInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.IngressInfo items = 1; 46 | * @param \Livekit\IngressInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\IngressInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListSIPTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.ListSIPTrunkRequest 13 | */ 14 | class ListSIPTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.Pagination page = 1; 18 | */ 19 | protected $page = null; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\Pagination $page 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field .livekit.Pagination page = 1; 37 | * @return \Livekit\Pagination|null 38 | */ 39 | public function getPage() 40 | { 41 | return $this->page; 42 | } 43 | 44 | public function hasPage() 45 | { 46 | return isset($this->page); 47 | } 48 | 49 | public function clearPage() 50 | { 51 | unset($this->page); 52 | } 53 | 54 | /** 55 | * Generated from protobuf field .livekit.Pagination page = 1; 56 | * @param \Livekit\Pagination $var 57 | * @return $this 58 | */ 59 | public function setPage($var) 60 | { 61 | GPBUtil::checkMessage($var, \Livekit\Pagination::class); 62 | $this->page = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListSIPTrunkResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListSIPTrunkResponse 13 | */ 14 | class ListSIPTrunkResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.SIPTrunkInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.SIPTrunkInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.SIPTrunkInfo items = 1; 46 | * @param \Livekit\SIPTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SIPTrunkInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPHeaderOptions.php: -------------------------------------------------------------------------------- 1 | livekit.SIPHeaderOptions 11 | */ 12 | class SIPHeaderOptions 13 | { 14 | /** 15 | * do not map any headers, except ones mapped explicitly 16 | * 17 | * Generated from protobuf enum SIP_NO_HEADERS = 0; 18 | */ 19 | const SIP_NO_HEADERS = 0; 20 | /** 21 | * map all X-* headers to sip.h.x-* attributes 22 | * 23 | * Generated from protobuf enum SIP_X_HEADERS = 1; 24 | */ 25 | const SIP_X_HEADERS = 1; 26 | /** 27 | * map all headers to sip.h.* attributes 28 | * 29 | * Generated from protobuf enum SIP_ALL_HEADERS = 2; 30 | */ 31 | const SIP_ALL_HEADERS = 2; 32 | 33 | private static $valueToName = [ 34 | self::SIP_NO_HEADERS => 'SIP_NO_HEADERS', 35 | self::SIP_X_HEADERS => 'SIP_X_HEADERS', 36 | self::SIP_ALL_HEADERS => 'SIP_ALL_HEADERS', 37 | ]; 38 | 39 | public static function name($value) 40 | { 41 | if (!isset(self::$valueToName[$value])) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 44 | } 45 | return self::$valueToName[$value]; 46 | } 47 | 48 | 49 | public static function value($name) 50 | { 51 | $const = __CLASS__ . '::' . strtoupper($name); 52 | if (!defined($const)) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 55 | } 56 | return constant($const); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/proto/Livekit/MuteRoomTrackResponse.php: -------------------------------------------------------------------------------- 1 | livekit.MuteRoomTrackResponse 13 | */ 14 | class MuteRoomTrackResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.TrackInfo track = 1; 18 | */ 19 | protected $track = null; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\TrackInfo $track 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitRoom::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field .livekit.TrackInfo track = 1; 37 | * @return \Livekit\TrackInfo|null 38 | */ 39 | public function getTrack() 40 | { 41 | return $this->track; 42 | } 43 | 44 | public function hasTrack() 45 | { 46 | return isset($this->track); 47 | } 48 | 49 | public function clearTrack() 50 | { 51 | unset($this->track); 52 | } 53 | 54 | /** 55 | * Generated from protobuf field .livekit.TrackInfo track = 1; 56 | * @param \Livekit\TrackInfo $var 57 | * @return $this 58 | */ 59 | public function setTrack($var) 60 | { 61 | GPBUtil::checkMessage($var, \Livekit\TrackInfo::class); 62 | $this->track = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/proto/Livekit/ActiveSpeakerUpdate.php: -------------------------------------------------------------------------------- 1 | livekit.ActiveSpeakerUpdate 13 | */ 14 | class ActiveSpeakerUpdate extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.SpeakerInfo speakers = 1; 18 | */ 19 | private $speakers; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SpeakerInfo[]|\Google\Protobuf\Internal\RepeatedField $speakers 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitModels::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.SpeakerInfo speakers = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getSpeakers() 40 | { 41 | return $this->speakers; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.SpeakerInfo speakers = 1; 46 | * @param \Livekit\SpeakerInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setSpeakers($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SpeakerInfo::class); 52 | $this->speakers = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPTransport.php: -------------------------------------------------------------------------------- 1 | livekit.SIPTransport 11 | */ 12 | class SIPTransport 13 | { 14 | /** 15 | * Generated from protobuf enum SIP_TRANSPORT_AUTO = 0; 16 | */ 17 | const SIP_TRANSPORT_AUTO = 0; 18 | /** 19 | * Generated from protobuf enum SIP_TRANSPORT_UDP = 1; 20 | */ 21 | const SIP_TRANSPORT_UDP = 1; 22 | /** 23 | * Generated from protobuf enum SIP_TRANSPORT_TCP = 2; 24 | */ 25 | const SIP_TRANSPORT_TCP = 2; 26 | /** 27 | * Generated from protobuf enum SIP_TRANSPORT_TLS = 3; 28 | */ 29 | const SIP_TRANSPORT_TLS = 3; 30 | 31 | private static $valueToName = [ 32 | self::SIP_TRANSPORT_AUTO => 'SIP_TRANSPORT_AUTO', 33 | self::SIP_TRANSPORT_UDP => 'SIP_TRANSPORT_UDP', 34 | self::SIP_TRANSPORT_TCP => 'SIP_TRANSPORT_TCP', 35 | self::SIP_TRANSPORT_TLS => 'SIP_TRANSPORT_TLS', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/RoomAgent.php: -------------------------------------------------------------------------------- 1 | livekit.RoomAgent 13 | */ 14 | class RoomAgent extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.RoomAgentDispatch dispatches = 1; 18 | */ 19 | private $dispatches; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\RoomAgentDispatch[]|\Google\Protobuf\Internal\RepeatedField $dispatches 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitRoom::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.RoomAgentDispatch dispatches = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getDispatches() 40 | { 41 | return $this->dispatches; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.RoomAgentDispatch dispatches = 1; 46 | * @param \Livekit\RoomAgentDispatch[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setDispatches($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\RoomAgentDispatch::class); 52 | $this->dispatches = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListSIPDispatchRuleResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListSIPDispatchRuleResponse 13 | */ 14 | class ListSIPDispatchRuleResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.SIPDispatchRuleInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPDispatchRuleInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.SIPDispatchRuleInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.SIPDispatchRuleInfo items = 1; 46 | * @param \Livekit\SIPDispatchRuleInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SIPDispatchRuleInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListSIPInboundTrunkResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListSIPInboundTrunkResponse 13 | */ 14 | class ListSIPInboundTrunkResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.SIPInboundTrunkInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPInboundTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.SIPInboundTrunkInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.SIPInboundTrunkInfo items = 1; 46 | * @param \Livekit\SIPInboundTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SIPInboundTrunkInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/VideoCodec.php: -------------------------------------------------------------------------------- 1 | livekit.VideoCodec 11 | */ 12 | class VideoCodec 13 | { 14 | /** 15 | * Generated from protobuf enum DEFAULT_VC = 0; 16 | */ 17 | const DEFAULT_VC = 0; 18 | /** 19 | * Generated from protobuf enum H264_BASELINE = 1; 20 | */ 21 | const H264_BASELINE = 1; 22 | /** 23 | * Generated from protobuf enum H264_MAIN = 2; 24 | */ 25 | const H264_MAIN = 2; 26 | /** 27 | * Generated from protobuf enum H264_HIGH = 3; 28 | */ 29 | const H264_HIGH = 3; 30 | /** 31 | * Generated from protobuf enum VP8 = 4; 32 | */ 33 | const VP8 = 4; 34 | 35 | private static $valueToName = [ 36 | self::DEFAULT_VC => 'DEFAULT_VC', 37 | self::H264_BASELINE => 'H264_BASELINE', 38 | self::H264_MAIN => 'H264_MAIN', 39 | self::H264_HIGH => 'H264_HIGH', 40 | self::VP8 => 'VP8', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | throw new UnexpectedValueException(sprintf( 58 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 59 | } 60 | return constant($const); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/proto/Livekit/AudioMixing.php: -------------------------------------------------------------------------------- 1 | livekit.AudioMixing 11 | */ 12 | class AudioMixing 13 | { 14 | /** 15 | * all users are mixed together 16 | * 17 | * Generated from protobuf enum DEFAULT_MIXING = 0; 18 | */ 19 | const DEFAULT_MIXING = 0; 20 | /** 21 | * agent audio in the left channel, all other audio in the right channel 22 | * 23 | * Generated from protobuf enum DUAL_CHANNEL_AGENT = 1; 24 | */ 25 | const DUAL_CHANNEL_AGENT = 1; 26 | /** 27 | * each new audio track alternates between left and right channels 28 | * 29 | * Generated from protobuf enum DUAL_CHANNEL_ALTERNATE = 2; 30 | */ 31 | const DUAL_CHANNEL_ALTERNATE = 2; 32 | 33 | private static $valueToName = [ 34 | self::DEFAULT_MIXING => 'DEFAULT_MIXING', 35 | self::DUAL_CHANNEL_AGENT => 'DUAL_CHANNEL_AGENT', 36 | self::DUAL_CHANNEL_ALTERNATE => 'DUAL_CHANNEL_ALTERNATE', 37 | ]; 38 | 39 | public static function name($value) 40 | { 41 | if (!isset(self::$valueToName[$value])) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 44 | } 45 | return self::$valueToName[$value]; 46 | } 47 | 48 | 49 | public static function value($name) 50 | { 51 | $const = __CLASS__ . '::' . strtoupper($name); 52 | if (!defined($const)) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 55 | } 56 | return constant($const); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListSIPOutboundTrunkResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListSIPOutboundTrunkResponse 13 | */ 14 | class ListSIPOutboundTrunkResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.SIPOutboundTrunkInfo items = 1; 18 | */ 19 | private $items; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPOutboundTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $items 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.SIPOutboundTrunkInfo items = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getItems() 40 | { 41 | return $this->items; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.SIPOutboundTrunkInfo items = 1; 46 | * @param \Livekit\SIPOutboundTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setItems($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SIPOutboundTrunkInfo::class); 52 | $this->items = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPMediaEncryption.php: -------------------------------------------------------------------------------- 1 | livekit.SIPMediaEncryption 11 | */ 12 | class SIPMediaEncryption 13 | { 14 | /** 15 | * do not enable encryption 16 | * 17 | * Generated from protobuf enum SIP_MEDIA_ENCRYPT_DISABLE = 0; 18 | */ 19 | const SIP_MEDIA_ENCRYPT_DISABLE = 0; 20 | /** 21 | * use encryption if available 22 | * 23 | * Generated from protobuf enum SIP_MEDIA_ENCRYPT_ALLOW = 1; 24 | */ 25 | const SIP_MEDIA_ENCRYPT_ALLOW = 1; 26 | /** 27 | * require encryption 28 | * 29 | * Generated from protobuf enum SIP_MEDIA_ENCRYPT_REQUIRE = 2; 30 | */ 31 | const SIP_MEDIA_ENCRYPT_REQUIRE = 2; 32 | 33 | private static $valueToName = [ 34 | self::SIP_MEDIA_ENCRYPT_DISABLE => 'SIP_MEDIA_ENCRYPT_DISABLE', 35 | self::SIP_MEDIA_ENCRYPT_ALLOW => 'SIP_MEDIA_ENCRYPT_ALLOW', 36 | self::SIP_MEDIA_ENCRYPT_REQUIRE => 'SIP_MEDIA_ENCRYPT_REQUIRE', 37 | ]; 38 | 39 | public static function name($value) 40 | { 41 | if (!isset(self::$valueToName[$value])) { 42 | throw new UnexpectedValueException(sprintf( 43 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 44 | } 45 | return self::$valueToName[$value]; 46 | } 47 | 48 | 49 | public static function value($name) 50 | { 51 | $const = __CLASS__ . '::' . strtoupper($name); 52 | if (!defined($const)) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 55 | } 56 | return constant($const); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListParticipantsResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListParticipantsResponse 13 | */ 14 | class ListParticipantsResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.ParticipantInfo participants = 1; 18 | */ 19 | private $participants; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\ParticipantInfo[]|\Google\Protobuf\Internal\RepeatedField $participants 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitRoom::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.ParticipantInfo participants = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getParticipants() 40 | { 41 | return $this->participants; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.ParticipantInfo participants = 1; 46 | * @param \Livekit\ParticipantInfo[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setParticipants($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\ParticipantInfo::class); 52 | $this->participants = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/GetSIPInboundTrunkResponse.php: -------------------------------------------------------------------------------- 1 | livekit.GetSIPInboundTrunkResponse 13 | */ 14 | class GetSIPInboundTrunkResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 18 | */ 19 | protected $trunk = null; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPInboundTrunkInfo $trunk 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 37 | * @return \Livekit\SIPInboundTrunkInfo|null 38 | */ 39 | public function getTrunk() 40 | { 41 | return $this->trunk; 42 | } 43 | 44 | public function hasTrunk() 45 | { 46 | return isset($this->trunk); 47 | } 48 | 49 | public function clearTrunk() 50 | { 51 | unset($this->trunk); 52 | } 53 | 54 | /** 55 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 56 | * @param \Livekit\SIPInboundTrunkInfo $var 57 | * @return $this 58 | */ 59 | public function setTrunk($var) 60 | { 61 | GPBUtil::checkMessage($var, \Livekit\SIPInboundTrunkInfo::class); 62 | $this->trunk = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/proto/Livekit/TrackSource.php: -------------------------------------------------------------------------------- 1 | livekit.TrackSource 11 | */ 12 | class TrackSource 13 | { 14 | /** 15 | * Generated from protobuf enum UNKNOWN = 0; 16 | */ 17 | const UNKNOWN = 0; 18 | /** 19 | * Generated from protobuf enum CAMERA = 1; 20 | */ 21 | const CAMERA = 1; 22 | /** 23 | * Generated from protobuf enum MICROPHONE = 2; 24 | */ 25 | const MICROPHONE = 2; 26 | /** 27 | * Generated from protobuf enum SCREEN_SHARE = 3; 28 | */ 29 | const SCREEN_SHARE = 3; 30 | /** 31 | * Generated from protobuf enum SCREEN_SHARE_AUDIO = 4; 32 | */ 33 | const SCREEN_SHARE_AUDIO = 4; 34 | 35 | private static $valueToName = [ 36 | self::UNKNOWN => 'UNKNOWN', 37 | self::CAMERA => 'CAMERA', 38 | self::MICROPHONE => 'MICROPHONE', 39 | self::SCREEN_SHARE => 'SCREEN_SHARE', 40 | self::SCREEN_SHARE_AUDIO => 'SCREEN_SHARE_AUDIO', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | throw new UnexpectedValueException(sprintf( 58 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 59 | } 60 | return constant($const); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/proto/Livekit/GetSIPOutboundTrunkResponse.php: -------------------------------------------------------------------------------- 1 | livekit.GetSIPOutboundTrunkResponse 13 | */ 14 | class GetSIPOutboundTrunkResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 18 | */ 19 | protected $trunk = null; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\SIPOutboundTrunkInfo $trunk 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitSip::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 37 | * @return \Livekit\SIPOutboundTrunkInfo|null 38 | */ 39 | public function getTrunk() 40 | { 41 | return $this->trunk; 42 | } 43 | 44 | public function hasTrunk() 45 | { 46 | return isset($this->trunk); 47 | } 48 | 49 | public function clearTrunk() 50 | { 51 | unset($this->trunk); 52 | } 53 | 54 | /** 55 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 56 | * @param \Livekit\SIPOutboundTrunkInfo $var 57 | * @return $this 58 | */ 59 | public function setTrunk($var) 60 | { 61 | GPBUtil::checkMessage($var, \Livekit\SIPOutboundTrunkInfo::class); 62 | $this->trunk = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataStream/OperationType.php: -------------------------------------------------------------------------------- 1 | livekit.DataStream.OperationType 13 | */ 14 | class OperationType 15 | { 16 | /** 17 | * Generated from protobuf enum CREATE = 0; 18 | */ 19 | const CREATE = 0; 20 | /** 21 | * Generated from protobuf enum UPDATE = 1; 22 | */ 23 | const UPDATE = 1; 24 | /** 25 | * Generated from protobuf enum DELETE = 2; 26 | */ 27 | const DELETE = 2; 28 | /** 29 | * Generated from protobuf enum REACTION = 3; 30 | */ 31 | const REACTION = 3; 32 | 33 | private static $valueToName = [ 34 | self::CREATE => 'CREATE', 35 | self::UPDATE => 'UPDATE', 36 | self::DELETE => 'DELETE', 37 | self::REACTION => 'REACTION', 38 | ]; 39 | 40 | public static function name($value) 41 | { 42 | if (!isset(self::$valueToName[$value])) { 43 | throw new UnexpectedValueException(sprintf( 44 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 45 | } 46 | return self::$valueToName[$value]; 47 | } 48 | 49 | 50 | public static function value($name) 51 | { 52 | $const = __CLASS__ . '::' . strtoupper($name); 53 | if (!defined($const)) { 54 | throw new UnexpectedValueException(sprintf( 55 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 56 | } 57 | return constant($const); 58 | } 59 | } 60 | 61 | // Adding a class alias for backwards compatibility with the previous class name. 62 | class_alias(OperationType::class, \Livekit\DataStream_OperationType::class); 63 | 64 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListAgentDispatchResponse.php: -------------------------------------------------------------------------------- 1 | livekit.ListAgentDispatchResponse 13 | */ 14 | class ListAgentDispatchResponse extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field repeated .livekit.AgentDispatch agent_dispatches = 1; 18 | */ 19 | private $agent_dispatches; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Livekit\AgentDispatch[]|\Google\Protobuf\Internal\RepeatedField $agent_dispatches 28 | * } 29 | */ 30 | public function __construct($data = NULL) { 31 | \GPBMetadata\LivekitAgentDispatch::initOnce(); 32 | parent::__construct($data); 33 | } 34 | 35 | /** 36 | * Generated from protobuf field repeated .livekit.AgentDispatch agent_dispatches = 1; 37 | * @return \Google\Protobuf\Internal\RepeatedField 38 | */ 39 | public function getAgentDispatches() 40 | { 41 | return $this->agent_dispatches; 42 | } 43 | 44 | /** 45 | * Generated from protobuf field repeated .livekit.AgentDispatch agent_dispatches = 1; 46 | * @param \Livekit\AgentDispatch[]|\Google\Protobuf\Internal\RepeatedField $var 47 | * @return $this 48 | */ 49 | public function setAgentDispatches($var) 50 | { 51 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\AgentDispatch::class); 52 | $this->agent_dispatches = $arr; 53 | 54 | return $this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/proto/Livekit/MigrateJobRequest.php: -------------------------------------------------------------------------------- 1 | livekit.MigrateJobRequest 13 | */ 14 | class MigrateJobRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * string job_id = 1 [deprecated = true]; 18 | * 19 | * Generated from protobuf field repeated string job_ids = 2; 20 | */ 21 | private $job_ids; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $job_ids 30 | * string job_id = 1 [deprecated = true]; 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitAgent::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * string job_id = 1 [deprecated = true]; 40 | * 41 | * Generated from protobuf field repeated string job_ids = 2; 42 | * @return \Google\Protobuf\Internal\RepeatedField 43 | */ 44 | public function getJobIds() 45 | { 46 | return $this->job_ids; 47 | } 48 | 49 | /** 50 | * string job_id = 1 [deprecated = true]; 51 | * 52 | * Generated from protobuf field repeated string job_ids = 2; 53 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var 54 | * @return $this 55 | */ 56 | public function setJobIds($var) 57 | { 58 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 59 | $this->job_ids = $arr; 60 | 61 | return $this; 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/proto/Livekit/ListRoomsRequest.php: -------------------------------------------------------------------------------- 1 | livekit.ListRoomsRequest 13 | */ 14 | class ListRoomsRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * when set, will only return rooms with name match 18 | * 19 | * Generated from protobuf field repeated string names = 1; 20 | */ 21 | private $names; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $names 30 | * when set, will only return rooms with name match 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitRoom::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * when set, will only return rooms with name match 40 | * 41 | * Generated from protobuf field repeated string names = 1; 42 | * @return \Google\Protobuf\Internal\RepeatedField 43 | */ 44 | public function getNames() 45 | { 46 | return $this->names; 47 | } 48 | 49 | /** 50 | * when set, will only return rooms with name match 51 | * 52 | * Generated from protobuf field repeated string names = 1; 53 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var 54 | * @return $this 55 | */ 56 | public function setNames($var) 57 | { 58 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 59 | $this->names = $arr; 60 | 61 | return $this; 62 | } 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/proto/Livekit/ParticipantInfo/KindDetail.php: -------------------------------------------------------------------------------- 1 | livekit.ParticipantInfo.KindDetail 11 | */ 12 | class KindDetail 13 | { 14 | /** 15 | * Generated from protobuf enum CLOUD_AGENT = 0; 16 | */ 17 | const CLOUD_AGENT = 0; 18 | /** 19 | * Generated from protobuf enum FORWARDED = 1; 20 | */ 21 | const FORWARDED = 1; 22 | /** 23 | * Generated from protobuf enum CONNECTOR_WHATSAPP = 2; 24 | */ 25 | const CONNECTOR_WHATSAPP = 2; 26 | /** 27 | * Generated from protobuf enum CONNECTOR_TWILIO = 3; 28 | */ 29 | const CONNECTOR_TWILIO = 3; 30 | 31 | private static $valueToName = [ 32 | self::CLOUD_AGENT => 'CLOUD_AGENT', 33 | self::FORWARDED => 'FORWARDED', 34 | self::CONNECTOR_WHATSAPP => 'CONNECTOR_WHATSAPP', 35 | self::CONNECTOR_TWILIO => 'CONNECTOR_TWILIO', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | // Adding a class alias for backwards compatibility with the previous class name. 60 | class_alias(KindDetail::class, \Livekit\ParticipantInfo_KindDetail::class); 61 | 62 | -------------------------------------------------------------------------------- /src/Traits/CaseConverter.php: -------------------------------------------------------------------------------- 1 | $value) { 48 | $newKey = $this->camelToSnake($key); 49 | $result[$newKey] = is_array($value) ? $this->convertArrayKeysToSnake($value) : $value; 50 | } 51 | return $result; 52 | } 53 | 54 | /** 55 | * Convert array keys from camelCase to snake_case. 56 | * 57 | * @param array $array 58 | * The array with camelCase keys. 59 | * 60 | * @return array 61 | * The array with snake_case keys. 62 | */ 63 | protected function convertArrayKeysToCamel(array $array): array { 64 | $result = []; 65 | foreach ($array as $key => $value) { 66 | $newKey = $this->snakeToCamel($key); 67 | $result[$newKey] = is_array($value) ? $this->convertArrayKeysToCamel($value) : $value; 68 | } 69 | return $result; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/proto/Livekit/ReconnectReason.php: -------------------------------------------------------------------------------- 1 | livekit.ReconnectReason 11 | */ 12 | class ReconnectReason 13 | { 14 | /** 15 | * Generated from protobuf enum RR_UNKNOWN = 0; 16 | */ 17 | const RR_UNKNOWN = 0; 18 | /** 19 | * Generated from protobuf enum RR_SIGNAL_DISCONNECTED = 1; 20 | */ 21 | const RR_SIGNAL_DISCONNECTED = 1; 22 | /** 23 | * Generated from protobuf enum RR_PUBLISHER_FAILED = 2; 24 | */ 25 | const RR_PUBLISHER_FAILED = 2; 26 | /** 27 | * Generated from protobuf enum RR_SUBSCRIBER_FAILED = 3; 28 | */ 29 | const RR_SUBSCRIBER_FAILED = 3; 30 | /** 31 | * Generated from protobuf enum RR_SWITCH_CANDIDATE = 4; 32 | */ 33 | const RR_SWITCH_CANDIDATE = 4; 34 | 35 | private static $valueToName = [ 36 | self::RR_UNKNOWN => 'RR_UNKNOWN', 37 | self::RR_SIGNAL_DISCONNECTED => 'RR_SIGNAL_DISCONNECTED', 38 | self::RR_PUBLISHER_FAILED => 'RR_PUBLISHER_FAILED', 39 | self::RR_SUBSCRIBER_FAILED => 'RR_SUBSCRIBER_FAILED', 40 | self::RR_SWITCH_CANDIDATE => 'RR_SWITCH_CANDIDATE', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | throw new UnexpectedValueException(sprintf( 58 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 59 | } 60 | return constant($const); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/proto/Livekit/CreateSIPInboundTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.CreateSIPInboundTrunkRequest 13 | */ 14 | class CreateSIPInboundTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Trunk ID is ignored 18 | * 19 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 20 | */ 21 | protected $trunk = null; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type \Livekit\SIPInboundTrunkInfo $trunk 30 | * Trunk ID is ignored 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitSip::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * Trunk ID is ignored 40 | * 41 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 42 | * @return \Livekit\SIPInboundTrunkInfo|null 43 | */ 44 | public function getTrunk() 45 | { 46 | return $this->trunk; 47 | } 48 | 49 | public function hasTrunk() 50 | { 51 | return isset($this->trunk); 52 | } 53 | 54 | public function clearTrunk() 55 | { 56 | unset($this->trunk); 57 | } 58 | 59 | /** 60 | * Trunk ID is ignored 61 | * 62 | * Generated from protobuf field .livekit.SIPInboundTrunkInfo trunk = 1; 63 | * @param \Livekit\SIPInboundTrunkInfo $var 64 | * @return $this 65 | */ 66 | public function setTrunk($var) 67 | { 68 | GPBUtil::checkMessage($var, \Livekit\SIPInboundTrunkInfo::class); 69 | $this->trunk = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/proto/Livekit/ParticipantInfo/State.php: -------------------------------------------------------------------------------- 1 | livekit.ParticipantInfo.State 11 | */ 12 | class State 13 | { 14 | /** 15 | * websocket' connected, but not offered yet 16 | * 17 | * Generated from protobuf enum JOINING = 0; 18 | */ 19 | const JOINING = 0; 20 | /** 21 | * server received client offer 22 | * 23 | * Generated from protobuf enum JOINED = 1; 24 | */ 25 | const JOINED = 1; 26 | /** 27 | * ICE connectivity established 28 | * 29 | * Generated from protobuf enum ACTIVE = 2; 30 | */ 31 | const ACTIVE = 2; 32 | /** 33 | * WS disconnected 34 | * 35 | * Generated from protobuf enum DISCONNECTED = 3; 36 | */ 37 | const DISCONNECTED = 3; 38 | 39 | private static $valueToName = [ 40 | self::JOINING => 'JOINING', 41 | self::JOINED => 'JOINED', 42 | self::ACTIVE => 'ACTIVE', 43 | self::DISCONNECTED => 'DISCONNECTED', 44 | ]; 45 | 46 | public static function name($value) 47 | { 48 | if (!isset(self::$valueToName[$value])) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 51 | } 52 | return self::$valueToName[$value]; 53 | } 54 | 55 | 56 | public static function value($name) 57 | { 58 | $const = __CLASS__ . '::' . strtoupper($name); 59 | if (!defined($const)) { 60 | throw new UnexpectedValueException(sprintf( 61 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 62 | } 63 | return constant($const); 64 | } 65 | } 66 | 67 | // Adding a class alias for backwards compatibility with the previous class name. 68 | class_alias(State::class, \Livekit\ParticipantInfo_State::class); 69 | 70 | -------------------------------------------------------------------------------- /src/proto/Livekit/CreateSIPOutboundTrunkRequest.php: -------------------------------------------------------------------------------- 1 | livekit.CreateSIPOutboundTrunkRequest 13 | */ 14 | class CreateSIPOutboundTrunkRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Trunk ID is ignored 18 | * 19 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 20 | */ 21 | protected $trunk = null; 22 | 23 | /** 24 | * Constructor. 25 | * 26 | * @param array $data { 27 | * Optional. Data for populating the Message object. 28 | * 29 | * @type \Livekit\SIPOutboundTrunkInfo $trunk 30 | * Trunk ID is ignored 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\LivekitSip::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * Trunk ID is ignored 40 | * 41 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 42 | * @return \Livekit\SIPOutboundTrunkInfo|null 43 | */ 44 | public function getTrunk() 45 | { 46 | return $this->trunk; 47 | } 48 | 49 | public function hasTrunk() 50 | { 51 | return isset($this->trunk); 52 | } 53 | 54 | public function clearTrunk() 55 | { 56 | unset($this->trunk); 57 | } 58 | 59 | /** 60 | * Trunk ID is ignored 61 | * 62 | * Generated from protobuf field .livekit.SIPOutboundTrunkInfo trunk = 1; 63 | * @param \Livekit\SIPOutboundTrunkInfo $var 64 | * @return $this 65 | */ 66 | public function setTrunk($var) 67 | { 68 | GPBUtil::checkMessage($var, \Livekit\SIPOutboundTrunkInfo::class); 69 | $this->trunk = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/proto/Livekit/BackupCodecPolicy.php: -------------------------------------------------------------------------------- 1 | livekit.BackupCodecPolicy 13 | */ 14 | class BackupCodecPolicy 15 | { 16 | /** 17 | * default behavior, the track prefer to regress to backup codec and all subscribers will receive the backup codec, 18 | * the sfu will try to regress codec if possible but not assured. 19 | * 20 | * Generated from protobuf enum PREFER_REGRESSION = 0; 21 | */ 22 | const PREFER_REGRESSION = 0; 23 | /** 24 | * encoding/send the primary and backup codec simultaneously 25 | * 26 | * Generated from protobuf enum SIMULCAST = 1; 27 | */ 28 | const SIMULCAST = 1; 29 | /** 30 | * force the track to regress to backup codec, this option can be used in video conference or the publisher has limited bandwidth/encoding power 31 | * 32 | * Generated from protobuf enum REGRESSION = 2; 33 | */ 34 | const REGRESSION = 2; 35 | 36 | private static $valueToName = [ 37 | self::PREFER_REGRESSION => 'PREFER_REGRESSION', 38 | self::SIMULCAST => 'SIMULCAST', 39 | self::REGRESSION => 'REGRESSION', 40 | ]; 41 | 42 | public static function name($value) 43 | { 44 | if (!isset(self::$valueToName[$value])) { 45 | throw new UnexpectedValueException(sprintf( 46 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 47 | } 48 | return self::$valueToName[$value]; 49 | } 50 | 51 | 52 | public static function value($name) 53 | { 54 | $const = __CLASS__ . '::' . strtoupper($name); 55 | if (!defined($const)) { 56 | throw new UnexpectedValueException(sprintf( 57 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 58 | } 59 | return constant($const); 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/proto/Livekit/SipDTMF.php: -------------------------------------------------------------------------------- 1 | livekit.SipDTMF 13 | */ 14 | class SipDTMF extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field uint32 code = 3; 18 | */ 19 | protected $code = 0; 20 | /** 21 | * Generated from protobuf field string digit = 4; 22 | */ 23 | protected $digit = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type int $code 32 | * @type string $digit 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitModels::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field uint32 code = 3; 42 | * @return int 43 | */ 44 | public function getCode() 45 | { 46 | return $this->code; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field uint32 code = 3; 51 | * @param int $var 52 | * @return $this 53 | */ 54 | public function setCode($var) 55 | { 56 | GPBUtil::checkUint32($var); 57 | $this->code = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string digit = 4; 64 | * @return string 65 | */ 66 | public function getDigit() 67 | { 68 | return $this->digit; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string digit = 4; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setDigit($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->digit = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/RoomAgentDispatch.php: -------------------------------------------------------------------------------- 1 | $value) { 28 | if (property_exists($this, $property)) { 29 | $this->{$property} = $value; 30 | } 31 | } 32 | } 33 | 34 | /** 35 | * Get the agent name. 36 | * 37 | * @return string|null 38 | * The agent name. 39 | */ 40 | public function getAgentName(): ?string { 41 | return $this->agentName; 42 | } 43 | 44 | /** 45 | * Set the agent name. 46 | * 47 | * @param string|null $agentName 48 | * The agent name. 49 | * 50 | * @return $this 51 | */ 52 | public function setAgentName(?string $agentName): self { 53 | $this->agentName = $agentName; 54 | return $this; 55 | } 56 | 57 | /** 58 | * Get the metadata. 59 | * 60 | * @return string|null 61 | * The metadata. 62 | */ 63 | public function getMetadata(): ?string { 64 | return $this->metadata; 65 | } 66 | 67 | /** 68 | * Set the metadata. 69 | * 70 | * @param string|null $metadata 71 | * The metadata. 72 | * 73 | * @return $this 74 | */ 75 | public function setMetadata(?string $metadata): self { 76 | $this->metadata = $metadata; 77 | return $this; 78 | } 79 | 80 | /** 81 | * Return the object properties which have been defined as an array. 82 | * 83 | * @return array 84 | * The object properties. 85 | */ 86 | public function getData(): array { 87 | return array_filter( 88 | get_object_vars($this), 89 | function ($v) { 90 | return !is_null($v); 91 | } 92 | ); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/proto/Livekit/VideoLayer/Mode.php: -------------------------------------------------------------------------------- 1 | livekit.VideoLayer.Mode 11 | */ 12 | class Mode 13 | { 14 | /** 15 | * Generated from protobuf enum MODE_UNUSED = 0; 16 | */ 17 | const MODE_UNUSED = 0; 18 | /** 19 | * Generated from protobuf enum ONE_SPATIAL_LAYER_PER_STREAM = 1; 20 | */ 21 | const ONE_SPATIAL_LAYER_PER_STREAM = 1; 22 | /** 23 | * Generated from protobuf enum MULTIPLE_SPATIAL_LAYERS_PER_STREAM = 2; 24 | */ 25 | const MULTIPLE_SPATIAL_LAYERS_PER_STREAM = 2; 26 | /** 27 | * Generated from protobuf enum ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR = 3; 28 | */ 29 | const ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR = 3; 30 | 31 | private static $valueToName = [ 32 | self::MODE_UNUSED => 'MODE_UNUSED', 33 | self::ONE_SPATIAL_LAYER_PER_STREAM => 'ONE_SPATIAL_LAYER_PER_STREAM', 34 | self::MULTIPLE_SPATIAL_LAYERS_PER_STREAM => 'MULTIPLE_SPATIAL_LAYERS_PER_STREAM', 35 | self::ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR => 'ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR', 36 | ]; 37 | 38 | public static function name($value) 39 | { 40 | if (!isset(self::$valueToName[$value])) { 41 | throw new UnexpectedValueException(sprintf( 42 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 43 | } 44 | return self::$valueToName[$value]; 45 | } 46 | 47 | 48 | public static function value($name) 49 | { 50 | $const = __CLASS__ . '::' . strtoupper($name); 51 | if (!defined($const)) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 54 | } 55 | return constant($const); 56 | } 57 | } 58 | 59 | // Adding a class alias for backwards compatibility with the previous class name. 60 | class_alias(Mode::class, \Livekit\VideoLayer_Mode::class); 61 | 62 | -------------------------------------------------------------------------------- /src/SIPGrant.php: -------------------------------------------------------------------------------- 1 | $value) { 28 | if (property_exists($this, $property)) { 29 | $this->{$property} = $value; 30 | } 31 | } 32 | } 33 | 34 | /** 35 | * Check if the admin permission is set. 36 | * 37 | * @return bool|null 38 | * The admin permission value. 39 | */ 40 | public function isAdmin(): ?bool { 41 | return $this->admin; 42 | } 43 | 44 | /** 45 | * Set the admin permission. 46 | * 47 | * @param bool $admin 48 | * The admin permission value. 49 | * 50 | * @return $this 51 | */ 52 | public function setAdmin(bool $admin = TRUE): self { 53 | $this->admin = $admin; 54 | return $this; 55 | } 56 | 57 | /** 58 | * Check if the call permission is set. 59 | * 60 | * @return bool|null 61 | * The call permission value. 62 | */ 63 | public function isCall(): ?bool { 64 | return $this->call; 65 | } 66 | 67 | /** 68 | * Set the call permission. 69 | * 70 | * @param bool $call 71 | * The call permission value. 72 | * 73 | * @return $this 74 | */ 75 | public function setCall(bool $call = TRUE): self { 76 | $this->call = $call; 77 | return $this; 78 | } 79 | 80 | /** 81 | * Return the object properties which have been defined as an array. 82 | * 83 | * @return array 84 | * The object properties. 85 | */ 86 | public function getData(): array { 87 | return array_filter( 88 | get_object_vars($this), 89 | function ($v) { 90 | return !is_null($v); 91 | } 92 | ); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/proto/Livekit/IngressState/Status.php: -------------------------------------------------------------------------------- 1 | livekit.IngressState.Status 11 | */ 12 | class Status 13 | { 14 | /** 15 | * Generated from protobuf enum ENDPOINT_INACTIVE = 0; 16 | */ 17 | const ENDPOINT_INACTIVE = 0; 18 | /** 19 | * Generated from protobuf enum ENDPOINT_BUFFERING = 1; 20 | */ 21 | const ENDPOINT_BUFFERING = 1; 22 | /** 23 | * Generated from protobuf enum ENDPOINT_PUBLISHING = 2; 24 | */ 25 | const ENDPOINT_PUBLISHING = 2; 26 | /** 27 | * Generated from protobuf enum ENDPOINT_ERROR = 3; 28 | */ 29 | const ENDPOINT_ERROR = 3; 30 | /** 31 | * Generated from protobuf enum ENDPOINT_COMPLETE = 4; 32 | */ 33 | const ENDPOINT_COMPLETE = 4; 34 | 35 | private static $valueToName = [ 36 | self::ENDPOINT_INACTIVE => 'ENDPOINT_INACTIVE', 37 | self::ENDPOINT_BUFFERING => 'ENDPOINT_BUFFERING', 38 | self::ENDPOINT_PUBLISHING => 'ENDPOINT_PUBLISHING', 39 | self::ENDPOINT_ERROR => 'ENDPOINT_ERROR', 40 | self::ENDPOINT_COMPLETE => 'ENDPOINT_COMPLETE', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | throw new UnexpectedValueException(sprintf( 58 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 59 | } 60 | return constant($const); 61 | } 62 | } 63 | 64 | // Adding a class alias for backwards compatibility with the previous class name. 65 | class_alias(Status::class, \Livekit\IngressState_Status::class); 66 | 67 | -------------------------------------------------------------------------------- /src/proto/Livekit/Codec.php: -------------------------------------------------------------------------------- 1 | livekit.Codec 13 | */ 14 | class Codec extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string mime = 1; 18 | */ 19 | protected $mime = ''; 20 | /** 21 | * Generated from protobuf field string fmtp_line = 2; 22 | */ 23 | protected $fmtp_line = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $mime 32 | * @type string $fmtp_line 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitModels::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field string mime = 1; 42 | * @return string 43 | */ 44 | public function getMime() 45 | { 46 | return $this->mime; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field string mime = 1; 51 | * @param string $var 52 | * @return $this 53 | */ 54 | public function setMime($var) 55 | { 56 | GPBUtil::checkString($var, True); 57 | $this->mime = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string fmtp_line = 2; 64 | * @return string 65 | */ 66 | public function getFmtpLine() 67 | { 68 | return $this->fmtp_line; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string fmtp_line = 2; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setFmtpLine($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->fmtp_line = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/SubscribedAudioCodec.php: -------------------------------------------------------------------------------- 1 | livekit.SubscribedAudioCodec 13 | */ 14 | class SubscribedAudioCodec extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string codec = 1; 18 | */ 19 | protected $codec = ''; 20 | /** 21 | * Generated from protobuf field bool enabled = 2; 22 | */ 23 | protected $enabled = false; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $codec 32 | * @type bool $enabled 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitModels::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field string codec = 1; 42 | * @return string 43 | */ 44 | public function getCodec() 45 | { 46 | return $this->codec; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field string codec = 1; 51 | * @param string $var 52 | * @return $this 53 | */ 54 | public function setCodec($var) 55 | { 56 | GPBUtil::checkString($var, True); 57 | $this->codec = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field bool enabled = 2; 64 | * @return bool 65 | */ 66 | public function getEnabled() 67 | { 68 | return $this->enabled; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field bool enabled = 2; 73 | * @param bool $var 74 | * @return $this 75 | */ 76 | public function setEnabled($var) 77 | { 78 | GPBUtil::checkBool($var); 79 | $this->enabled = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/TimedVersion.php: -------------------------------------------------------------------------------- 1 | livekit.TimedVersion 13 | */ 14 | class TimedVersion extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field int64 unix_micro = 1; 18 | */ 19 | protected $unix_micro = 0; 20 | /** 21 | * Generated from protobuf field int32 ticks = 2; 22 | */ 23 | protected $ticks = 0; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type int|string $unix_micro 32 | * @type int $ticks 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitModels::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field int64 unix_micro = 1; 42 | * @return int|string 43 | */ 44 | public function getUnixMicro() 45 | { 46 | return $this->unix_micro; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field int64 unix_micro = 1; 51 | * @param int|string $var 52 | * @return $this 53 | */ 54 | public function setUnixMicro($var) 55 | { 56 | GPBUtil::checkInt64($var); 57 | $this->unix_micro = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field int32 ticks = 2; 64 | * @return int 65 | */ 66 | public function getTicks() 67 | { 68 | return $this->ticks; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field int32 ticks = 2; 73 | * @param int $var 74 | * @return $this 75 | */ 76 | public function setTicks($var) 77 | { 78 | GPBUtil::checkInt32($var); 79 | $this->ticks = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/UpdateLayoutRequest.php: -------------------------------------------------------------------------------- 1 | livekit.UpdateLayoutRequest 13 | */ 14 | class UpdateLayoutRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string egress_id = 1; 18 | */ 19 | protected $egress_id = ''; 20 | /** 21 | * Generated from protobuf field string layout = 2; 22 | */ 23 | protected $layout = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $egress_id 32 | * @type string $layout 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitEgress::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field string egress_id = 1; 42 | * @return string 43 | */ 44 | public function getEgressId() 45 | { 46 | return $this->egress_id; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field string egress_id = 1; 51 | * @param string $var 52 | * @return $this 53 | */ 54 | public function setEgressId($var) 55 | { 56 | GPBUtil::checkString($var, True); 57 | $this->egress_id = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string layout = 2; 64 | * @return string 65 | */ 66 | public function getLayout() 67 | { 68 | return $this->layout; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string layout = 2; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setLayout($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->layout = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/DeleteAgentDispatchRequest.php: -------------------------------------------------------------------------------- 1 | livekit.DeleteAgentDispatchRequest 13 | */ 14 | class DeleteAgentDispatchRequest extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string dispatch_id = 1; 18 | */ 19 | protected $dispatch_id = ''; 20 | /** 21 | * Generated from protobuf field string room = 2; 22 | */ 23 | protected $room = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $dispatch_id 32 | * @type string $room 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitAgentDispatch::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field string dispatch_id = 1; 42 | * @return string 43 | */ 44 | public function getDispatchId() 45 | { 46 | return $this->dispatch_id; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field string dispatch_id = 1; 51 | * @param string $var 52 | * @return $this 53 | */ 54 | public function setDispatchId($var) 55 | { 56 | GPBUtil::checkString($var, True); 57 | $this->dispatch_id = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string room = 2; 64 | * @return string 65 | */ 66 | public function getRoom() 67 | { 68 | return $this->room; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string room = 2; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setRoom($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->room = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/RoomAgentDispatch.php: -------------------------------------------------------------------------------- 1 | livekit.RoomAgentDispatch 13 | */ 14 | class RoomAgentDispatch extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field string agent_name = 1; 18 | */ 19 | protected $agent_name = ''; 20 | /** 21 | * Generated from protobuf field string metadata = 2; 22 | */ 23 | protected $metadata = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $agent_name 32 | * @type string $metadata 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitAgentDispatch::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field string agent_name = 1; 42 | * @return string 43 | */ 44 | public function getAgentName() 45 | { 46 | return $this->agent_name; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field string agent_name = 1; 51 | * @param string $var 52 | * @return $this 53 | */ 54 | public function setAgentName($var) 55 | { 56 | GPBUtil::checkString($var, True); 57 | $this->agent_name = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string metadata = 2; 64 | * @return string 65 | */ 66 | public function getMetadata() 67 | { 68 | return $this->metadata; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string metadata = 2; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setMetadata($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->metadata = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/WorkerPong.php: -------------------------------------------------------------------------------- 1 | livekit.WorkerPong 13 | */ 14 | class WorkerPong extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field int64 last_timestamp = 1; 18 | */ 19 | protected $last_timestamp = 0; 20 | /** 21 | * Generated from protobuf field int64 timestamp = 2; 22 | */ 23 | protected $timestamp = 0; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type int|string $last_timestamp 32 | * @type int|string $timestamp 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitAgent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field int64 last_timestamp = 1; 42 | * @return int|string 43 | */ 44 | public function getLastTimestamp() 45 | { 46 | return $this->last_timestamp; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field int64 last_timestamp = 1; 51 | * @param int|string $var 52 | * @return $this 53 | */ 54 | public function setLastTimestamp($var) 55 | { 56 | GPBUtil::checkInt64($var); 57 | $this->last_timestamp = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field int64 timestamp = 2; 64 | * @return int|string 65 | */ 66 | public function getTimestamp() 67 | { 68 | return $this->timestamp; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field int64 timestamp = 2; 73 | * @param int|string $var 74 | * @return $this 75 | */ 76 | public function setTimestamp($var) 77 | { 78 | GPBUtil::checkInt64($var); 79 | $this->timestamp = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPStatus.php: -------------------------------------------------------------------------------- 1 | livekit.SIPStatus 15 | */ 16 | class SIPStatus extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Generated from protobuf field .livekit.SIPStatusCode code = 1; 20 | */ 21 | protected $code = 0; 22 | /** 23 | * Generated from protobuf field string status = 2; 24 | */ 25 | protected $status = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type int $code 34 | * @type string $status 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\LivekitSip::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Generated from protobuf field .livekit.SIPStatusCode code = 1; 44 | * @return int 45 | */ 46 | public function getCode() 47 | { 48 | return $this->code; 49 | } 50 | 51 | /** 52 | * Generated from protobuf field .livekit.SIPStatusCode code = 1; 53 | * @param int $var 54 | * @return $this 55 | */ 56 | public function setCode($var) 57 | { 58 | GPBUtil::checkEnum($var, \Livekit\SIPStatusCode::class); 59 | $this->code = $var; 60 | 61 | return $this; 62 | } 63 | 64 | /** 65 | * Generated from protobuf field string status = 2; 66 | * @return string 67 | */ 68 | public function getStatus() 69 | { 70 | return $this->status; 71 | } 72 | 73 | /** 74 | * Generated from protobuf field string status = 2; 75 | * @param string $var 76 | * @return $this 77 | */ 78 | public function setStatus($var) 79 | { 80 | GPBUtil::checkString($var, True); 81 | $this->status = $var; 82 | 83 | return $this; 84 | } 85 | 86 | } 87 | 88 | -------------------------------------------------------------------------------- /src/proto/Livekit/EgressStatus.php: -------------------------------------------------------------------------------- 1 | livekit.EgressStatus 11 | */ 12 | class EgressStatus 13 | { 14 | /** 15 | * Generated from protobuf enum EGRESS_STARTING = 0; 16 | */ 17 | const EGRESS_STARTING = 0; 18 | /** 19 | * Generated from protobuf enum EGRESS_ACTIVE = 1; 20 | */ 21 | const EGRESS_ACTIVE = 1; 22 | /** 23 | * Generated from protobuf enum EGRESS_ENDING = 2; 24 | */ 25 | const EGRESS_ENDING = 2; 26 | /** 27 | * Generated from protobuf enum EGRESS_COMPLETE = 3; 28 | */ 29 | const EGRESS_COMPLETE = 3; 30 | /** 31 | * Generated from protobuf enum EGRESS_FAILED = 4; 32 | */ 33 | const EGRESS_FAILED = 4; 34 | /** 35 | * Generated from protobuf enum EGRESS_ABORTED = 5; 36 | */ 37 | const EGRESS_ABORTED = 5; 38 | /** 39 | * Generated from protobuf enum EGRESS_LIMIT_REACHED = 6; 40 | */ 41 | const EGRESS_LIMIT_REACHED = 6; 42 | 43 | private static $valueToName = [ 44 | self::EGRESS_STARTING => 'EGRESS_STARTING', 45 | self::EGRESS_ACTIVE => 'EGRESS_ACTIVE', 46 | self::EGRESS_ENDING => 'EGRESS_ENDING', 47 | self::EGRESS_COMPLETE => 'EGRESS_COMPLETE', 48 | self::EGRESS_FAILED => 'EGRESS_FAILED', 49 | self::EGRESS_ABORTED => 'EGRESS_ABORTED', 50 | self::EGRESS_LIMIT_REACHED => 'EGRESS_LIMIT_REACHED', 51 | ]; 52 | 53 | public static function name($value) 54 | { 55 | if (!isset(self::$valueToName[$value])) { 56 | throw new UnexpectedValueException(sprintf( 57 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 58 | } 59 | return self::$valueToName[$value]; 60 | } 61 | 62 | 63 | public static function value($name) 64 | { 65 | $const = __CLASS__ . '::' . strtoupper($name); 66 | if (!defined($const)) { 67 | throw new UnexpectedValueException(sprintf( 68 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 69 | } 70 | return constant($const); 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/proto/Livekit/DataTrackExtensionParticipantSid.php: -------------------------------------------------------------------------------- 1 | livekit.DataTrackExtensionParticipantSid 13 | */ 14 | class DataTrackExtensionParticipantSid extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * Generated from protobuf field .livekit.DataTrackExtensionID id = 1; 18 | */ 19 | protected $id = 0; 20 | /** 21 | * Generated from protobuf field string participant_sid = 2; 22 | */ 23 | protected $participant_sid = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type int $id 32 | * @type string $participant_sid 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\LivekitModels::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Generated from protobuf field .livekit.DataTrackExtensionID id = 1; 42 | * @return int 43 | */ 44 | public function getId() 45 | { 46 | return $this->id; 47 | } 48 | 49 | /** 50 | * Generated from protobuf field .livekit.DataTrackExtensionID id = 1; 51 | * @param int $var 52 | * @return $this 53 | */ 54 | public function setId($var) 55 | { 56 | GPBUtil::checkEnum($var, \Livekit\DataTrackExtensionID::class); 57 | $this->id = $var; 58 | 59 | return $this; 60 | } 61 | 62 | /** 63 | * Generated from protobuf field string participant_sid = 2; 64 | * @return string 65 | */ 66 | public function getParticipantSid() 67 | { 68 | return $this->participant_sid; 69 | } 70 | 71 | /** 72 | * Generated from protobuf field string participant_sid = 2; 73 | * @param string $var 74 | * @return $this 75 | */ 76 | public function setParticipantSid($var) 77 | { 78 | GPBUtil::checkString($var, True); 79 | $this->participant_sid = $var; 80 | 81 | return $this; 82 | } 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/proto/Livekit/SIPCallStatus.php: -------------------------------------------------------------------------------- 1 | livekit.SIPCallStatus 11 | */ 12 | class SIPCallStatus 13 | { 14 | /** 15 | * Incoming call is being handled by the SIP service. The SIP participant hasn't joined a LiveKit room yet 16 | * 17 | * Generated from protobuf enum SCS_CALL_INCOMING = 0; 18 | */ 19 | const SCS_CALL_INCOMING = 0; 20 | /** 21 | * SIP participant for outgoing call has been created. The SIP outgoing call is being established 22 | * 23 | * Generated from protobuf enum SCS_PARTICIPANT_JOINED = 1; 24 | */ 25 | const SCS_PARTICIPANT_JOINED = 1; 26 | /** 27 | * Call is ongoing. SIP participant is active in the LiveKit room 28 | * 29 | * Generated from protobuf enum SCS_ACTIVE = 2; 30 | */ 31 | const SCS_ACTIVE = 2; 32 | /** 33 | * Call has ended 34 | * 35 | * Generated from protobuf enum SCS_DISCONNECTED = 3; 36 | */ 37 | const SCS_DISCONNECTED = 3; 38 | /** 39 | * Call has ended or never succeeded because of an error 40 | * 41 | * Generated from protobuf enum SCS_ERROR = 4; 42 | */ 43 | const SCS_ERROR = 4; 44 | 45 | private static $valueToName = [ 46 | self::SCS_CALL_INCOMING => 'SCS_CALL_INCOMING', 47 | self::SCS_PARTICIPANT_JOINED => 'SCS_PARTICIPANT_JOINED', 48 | self::SCS_ACTIVE => 'SCS_ACTIVE', 49 | self::SCS_DISCONNECTED => 'SCS_DISCONNECTED', 50 | self::SCS_ERROR => 'SCS_ERROR', 51 | ]; 52 | 53 | public static function name($value) 54 | { 55 | if (!isset(self::$valueToName[$value])) { 56 | throw new UnexpectedValueException(sprintf( 57 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 58 | } 59 | return self::$valueToName[$value]; 60 | } 61 | 62 | 63 | public static function value($name) 64 | { 65 | $const = __CLASS__ . '::' . strtoupper($name); 66 | if (!defined($const)) { 67 | throw new UnexpectedValueException(sprintf( 68 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 69 | } 70 | return constant($const); 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/proto/Livekit/ParticipantInfo/Kind.php: -------------------------------------------------------------------------------- 1 | livekit.ParticipantInfo.Kind 11 | */ 12 | class Kind 13 | { 14 | /** 15 | * standard participants, e.g. web clients 16 | * 17 | * Generated from protobuf enum STANDARD = 0; 18 | */ 19 | const STANDARD = 0; 20 | /** 21 | * only ingests streams 22 | * 23 | * Generated from protobuf enum INGRESS = 1; 24 | */ 25 | const INGRESS = 1; 26 | /** 27 | * only consumes streams 28 | * 29 | * Generated from protobuf enum EGRESS = 2; 30 | */ 31 | const EGRESS = 2; 32 | /** 33 | * SIP participants 34 | * 35 | * Generated from protobuf enum SIP = 3; 36 | */ 37 | const SIP = 3; 38 | /** 39 | * LiveKit agents 40 | * 41 | * Generated from protobuf enum AGENT = 4; 42 | */ 43 | const AGENT = 4; 44 | /** 45 | * Connectors participants 46 | * 47 | * Generated from protobuf enum CONNECTOR = 7; 48 | */ 49 | const CONNECTOR = 7; 50 | 51 | private static $valueToName = [ 52 | self::STANDARD => 'STANDARD', 53 | self::INGRESS => 'INGRESS', 54 | self::EGRESS => 'EGRESS', 55 | self::SIP => 'SIP', 56 | self::AGENT => 'AGENT', 57 | self::CONNECTOR => 'CONNECTOR', 58 | ]; 59 | 60 | public static function name($value) 61 | { 62 | if (!isset(self::$valueToName[$value])) { 63 | throw new UnexpectedValueException(sprintf( 64 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 65 | } 66 | return self::$valueToName[$value]; 67 | } 68 | 69 | 70 | public static function value($name) 71 | { 72 | $const = __CLASS__ . '::' . strtoupper($name); 73 | if (!defined($const)) { 74 | throw new UnexpectedValueException(sprintf( 75 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 76 | } 77 | return constant($const); 78 | } 79 | } 80 | 81 | // Adding a class alias for backwards compatibility with the previous class name. 82 | class_alias(Kind::class, \Livekit\ParticipantInfo_Kind::class); 83 | 84 | -------------------------------------------------------------------------------- /src/proto/Livekit/Pagination.php: -------------------------------------------------------------------------------- 1 | livekit.Pagination 13 | */ 14 | class Pagination extends \Google\Protobuf\Internal\Message 15 | { 16 | /** 17 | * list entities which IDs are greater 18 | * 19 | * Generated from protobuf field string after_id = 1; 20 | */ 21 | protected $after_id = ''; 22 | /** 23 | * Generated from protobuf field int32 limit = 2; 24 | */ 25 | protected $limit = 0; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $after_id 34 | * list entities which IDs are greater 35 | * @type int $limit 36 | * } 37 | */ 38 | public function __construct($data = NULL) { 39 | \GPBMetadata\LivekitModels::initOnce(); 40 | parent::__construct($data); 41 | } 42 | 43 | /** 44 | * list entities which IDs are greater 45 | * 46 | * Generated from protobuf field string after_id = 1; 47 | * @return string 48 | */ 49 | public function getAfterId() 50 | { 51 | return $this->after_id; 52 | } 53 | 54 | /** 55 | * list entities which IDs are greater 56 | * 57 | * Generated from protobuf field string after_id = 1; 58 | * @param string $var 59 | * @return $this 60 | */ 61 | public function setAfterId($var) 62 | { 63 | GPBUtil::checkString($var, True); 64 | $this->after_id = $var; 65 | 66 | return $this; 67 | } 68 | 69 | /** 70 | * Generated from protobuf field int32 limit = 2; 71 | * @return int 72 | */ 73 | public function getLimit() 74 | { 75 | return $this->limit; 76 | } 77 | 78 | /** 79 | * Generated from protobuf field int32 limit = 2; 80 | * @param int $var 81 | * @return $this 82 | */ 83 | public function setLimit($var) 84 | { 85 | GPBUtil::checkInt32($var); 86 | $this->limit = $var; 87 | 88 | return $this; 89 | } 90 | 91 | } 92 | 93 | --------------------------------------------------------------------------------