diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index f4943934..79aa322c 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -16,7 +16,7 @@ from . import track_pb2 as track__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11participant.proto\x12\rlivekit.proto\x1a\x0chandle.proto\x1a\x0btrack.proto\"\xea\x03\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x02(\t\x12\x0c\n\x04name\x18\x02 \x02(\t\x12\x10\n\x08identity\x18\x03 \x02(\t\x12.\n\x05state\x18\x04 \x02(\x0e\x32\x1f.livekit.proto.ParticipantState\x12\x10\n\x08metadata\x18\x05 \x02(\t\x12\x42\n\nattributes\x18\x06 \x03(\x0b\x32..livekit.proto.ParticipantInfo.AttributesEntry\x12,\n\x04kind\x18\x07 \x02(\x0e\x32\x1e.livekit.proto.ParticipantKind\x12:\n\x11\x64isconnect_reason\x18\x08 \x02(\x0e\x32\x1f.livekit.proto.DisconnectReason\x12\x11\n\tjoined_at\x18\t \x02(\x03\x12:\n\x0ckind_details\x18\n \x03(\x0e\x32$.livekit.proto.ParticipantKindDetail\x12\x38\n\npermission\x18\x0b \x01(\x0b\x32$.livekit.proto.ParticipantPermission\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"o\n\x10OwnedParticipant\x12-\n\x06handle\x18\x01 \x02(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x02(\x0b\x32\x1e.livekit.proto.ParticipantInfo\"\x84\x02\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x02(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x02(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x02(\x08\x12\x37\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x1a.livekit.proto.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x02(\x08\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x02(\x08\x12\x1d\n\x15\x63\x61n_subscribe_metrics\x18\x0c \x02(\x08\x12 \n\x18\x63\x61n_manage_agent_session\x18\r \x02(\x08*\x91\x01\n\x10ParticipantState\x12\x1d\n\x19PARTICIPANT_STATE_JOINING\x10\x00\x12\x1c\n\x18PARTICIPANT_STATE_JOINED\x10\x01\x12\x1c\n\x18PARTICIPANT_STATE_ACTIVE\x10\x02\x12\"\n\x1ePARTICIPANT_STATE_DISCONNECTED\x10\x03*\xde\x01\n\x0fParticipantKind\x12\x1d\n\x19PARTICIPANT_KIND_STANDARD\x10\x00\x12\x1c\n\x18PARTICIPANT_KIND_INGRESS\x10\x01\x12\x1b\n\x17PARTICIPANT_KIND_EGRESS\x10\x02\x12\x18\n\x14PARTICIPANT_KIND_SIP\x10\x03\x12\x1a\n\x16PARTICIPANT_KIND_AGENT\x10\x04\x12\x1e\n\x1aPARTICIPANT_KIND_CONNECTOR\x10\x05\x12\x1b\n\x17PARTICIPANT_KIND_BRIDGE\x10\x06*\xee\x01\n\x15ParticipantKindDetail\x12\'\n#PARTICIPANT_KIND_DETAIL_CLOUD_AGENT\x10\x00\x12%\n!PARTICIPANT_KIND_DETAIL_FORWARDED\x10\x01\x12.\n*PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP\x10\x02\x12,\n(PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO\x10\x03\x12\'\n#PARTICIPANT_KIND_DETAIL_BRIDGE_RTSP\x10\x04*\xe8\x02\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n\x12\x14\n\x10USER_UNAVAILABLE\x10\x0b\x12\x11\n\rUSER_REJECTED\x10\x0c\x12\x15\n\x11SIP_TRUNK_FAILURE\x10\r\x12\x16\n\x12\x43ONNECTION_TIMEOUT\x10\x0e\x12\x11\n\rMEDIA_FAILURE\x10\x0f\x12\x0f\n\x0b\x41GENT_ERROR\x10\x10\x42\x10\xaa\x02\rLiveKit.Proto') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11participant.proto\x12\rlivekit.proto\x1a\x0chandle.proto\x1a\x0btrack.proto\"\x83\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x02(\t\x12\x0c\n\x04name\x18\x02 \x02(\t\x12\x10\n\x08identity\x18\x03 \x02(\t\x12.\n\x05state\x18\x04 \x02(\x0e\x32\x1f.livekit.proto.ParticipantState\x12\x10\n\x08metadata\x18\x05 \x02(\t\x12\x42\n\nattributes\x18\x06 \x03(\x0b\x32..livekit.proto.ParticipantInfo.AttributesEntry\x12,\n\x04kind\x18\x07 \x02(\x0e\x32\x1e.livekit.proto.ParticipantKind\x12:\n\x11\x64isconnect_reason\x18\x08 \x02(\x0e\x32\x1f.livekit.proto.DisconnectReason\x12\x11\n\tjoined_at\x18\t \x02(\x03\x12:\n\x0ckind_details\x18\n \x03(\x0e\x32$.livekit.proto.ParticipantKindDetail\x12\x38\n\npermission\x18\x0b \x01(\x0b\x32$.livekit.proto.ParticipantPermission\x12\x17\n\x0f\x63lient_protocol\x18\x0c \x02(\x05\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"o\n\x10OwnedParticipant\x12-\n\x06handle\x18\x01 \x02(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x02(\x0b\x32\x1e.livekit.proto.ParticipantInfo\"\x84\x02\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x02(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x02(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x02(\x08\x12\x37\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x1a.livekit.proto.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x02(\x08\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x02(\x08\x12\x1d\n\x15\x63\x61n_subscribe_metrics\x18\x0c \x02(\x08\x12 \n\x18\x63\x61n_manage_agent_session\x18\r \x02(\x08*\x91\x01\n\x10ParticipantState\x12\x1d\n\x19PARTICIPANT_STATE_JOINING\x10\x00\x12\x1c\n\x18PARTICIPANT_STATE_JOINED\x10\x01\x12\x1c\n\x18PARTICIPANT_STATE_ACTIVE\x10\x02\x12\"\n\x1ePARTICIPANT_STATE_DISCONNECTED\x10\x03*\xde\x01\n\x0fParticipantKind\x12\x1d\n\x19PARTICIPANT_KIND_STANDARD\x10\x00\x12\x1c\n\x18PARTICIPANT_KIND_INGRESS\x10\x01\x12\x1b\n\x17PARTICIPANT_KIND_EGRESS\x10\x02\x12\x18\n\x14PARTICIPANT_KIND_SIP\x10\x03\x12\x1a\n\x16PARTICIPANT_KIND_AGENT\x10\x04\x12\x1e\n\x1aPARTICIPANT_KIND_CONNECTOR\x10\x05\x12\x1b\n\x17PARTICIPANT_KIND_BRIDGE\x10\x06*\xee\x01\n\x15ParticipantKindDetail\x12\'\n#PARTICIPANT_KIND_DETAIL_CLOUD_AGENT\x10\x00\x12%\n!PARTICIPANT_KIND_DETAIL_FORWARDED\x10\x01\x12.\n*PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP\x10\x02\x12,\n(PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO\x10\x03\x12\'\n#PARTICIPANT_KIND_DETAIL_BRIDGE_RTSP\x10\x04*\xe8\x02\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n\x12\x14\n\x10USER_UNAVAILABLE\x10\x0b\x12\x11\n\rUSER_REJECTED\x10\x0c\x12\x15\n\x11SIP_TRUNK_FAILURE\x10\r\x12\x16\n\x12\x43ONNECTION_TIMEOUT\x10\x0e\x12\x11\n\rMEDIA_FAILURE\x10\x0f\x12\x0f\n\x0b\x41GENT_ERROR\x10\x10\x42\x10\xaa\x02\rLiveKit.Proto') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,20 +26,20 @@ _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._options = None _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_PARTICIPANTSTATE']._serialized_start=933 - _globals['_PARTICIPANTSTATE']._serialized_end=1078 - _globals['_PARTICIPANTKIND']._serialized_start=1081 - _globals['_PARTICIPANTKIND']._serialized_end=1303 - _globals['_PARTICIPANTKINDDETAIL']._serialized_start=1306 - _globals['_PARTICIPANTKINDDETAIL']._serialized_end=1544 - _globals['_DISCONNECTREASON']._serialized_start=1547 - _globals['_DISCONNECTREASON']._serialized_end=1907 + _globals['_PARTICIPANTSTATE']._serialized_start=958 + _globals['_PARTICIPANTSTATE']._serialized_end=1103 + _globals['_PARTICIPANTKIND']._serialized_start=1106 + _globals['_PARTICIPANTKIND']._serialized_end=1328 + _globals['_PARTICIPANTKINDDETAIL']._serialized_start=1331 + _globals['_PARTICIPANTKINDDETAIL']._serialized_end=1569 + _globals['_DISCONNECTREASON']._serialized_start=1572 + _globals['_DISCONNECTREASON']._serialized_end=1932 _globals['_PARTICIPANTINFO']._serialized_start=64 - _globals['_PARTICIPANTINFO']._serialized_end=554 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=505 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=554 - _globals['_OWNEDPARTICIPANT']._serialized_start=556 - _globals['_OWNEDPARTICIPANT']._serialized_end=667 - _globals['_PARTICIPANTPERMISSION']._serialized_start=670 - _globals['_PARTICIPANTPERMISSION']._serialized_end=930 + _globals['_PARTICIPANTINFO']._serialized_end=579 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=530 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=579 + _globals['_OWNEDPARTICIPANT']._serialized_start=581 + _globals['_OWNEDPARTICIPANT']._serialized_end=692 + _globals['_PARTICIPANTPERMISSION']._serialized_start=695 + _globals['_PARTICIPANTPERMISSION']._serialized_end=955 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi index 4c84d2c6..be255f03 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi @@ -202,6 +202,7 @@ class ParticipantInfo(google.protobuf.message.Message): JOINED_AT_FIELD_NUMBER: builtins.int KIND_DETAILS_FIELD_NUMBER: builtins.int PERMISSION_FIELD_NUMBER: builtins.int + CLIENT_PROTOCOL_FIELD_NUMBER: builtins.int sid: builtins.str name: builtins.str identity: builtins.str @@ -211,6 +212,7 @@ class ParticipantInfo(google.protobuf.message.Message): disconnect_reason: global___DisconnectReason.ValueType joined_at: builtins.int """ms timestamp of when the participant joined the room, maps to joined_at_ms in livekit_models""" + client_protocol: builtins.int @property def attributes(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... @property @@ -231,9 +233,10 @@ class ParticipantInfo(google.protobuf.message.Message): joined_at: builtins.int | None = ..., kind_details: collections.abc.Iterable[global___ParticipantKindDetail.ValueType] | None = ..., permission: global___ParticipantPermission | None = ..., + client_protocol: builtins.int | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["disconnect_reason", b"disconnect_reason", "identity", b"identity", "joined_at", b"joined_at", "kind", b"kind", "metadata", b"metadata", "name", b"name", "permission", b"permission", "sid", b"sid", "state", b"state"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "disconnect_reason", b"disconnect_reason", "identity", b"identity", "joined_at", b"joined_at", "kind", b"kind", "kind_details", b"kind_details", "metadata", b"metadata", "name", b"name", "permission", b"permission", "sid", b"sid", "state", b"state"]) -> None: ... + def HasField(self, field_name: typing.Literal["client_protocol", b"client_protocol", "disconnect_reason", b"disconnect_reason", "identity", b"identity", "joined_at", b"joined_at", "kind", b"kind", "metadata", b"metadata", "name", b"name", "permission", b"permission", "sid", b"sid", "state", b"state"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["attributes", b"attributes", "client_protocol", b"client_protocol", "disconnect_reason", b"disconnect_reason", "identity", b"identity", "joined_at", b"joined_at", "kind", b"kind", "kind_details", b"kind_details", "metadata", b"metadata", "name", b"name", "permission", b"permission", "sid", b"sid", "state", b"state"]) -> None: ... global___ParticipantInfo = ParticipantInfo diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index c7211917..a26363b1 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x02(\r\x12\x0f\n\x07message\x18\x02 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xab\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x02(\t\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x0f\n\x07payload\x18\x04 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x05 \x01(\r\x12\x18\n\x10request_async_id\x18\x06 \x01(\x04\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"\x96\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcError\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x1b\n\x19RegisterRpcMethodResponse\"\x1d\n\x1bUnregisterRpcMethodResponse\"4\n#RpcMethodInvocationResponseResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"_\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcError\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x12\n\nrequest_id\x18\x04 \x02(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x02(\t\x12\x0f\n\x07payload\x18\x06 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x02(\rB\x10\xaa\x02\rLiveKit.Proto') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x02(\r\x12\x0f\n\x07message\x18\x02 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xce\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x02(\t\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x0f\n\x07payload\x18\x04 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x05 \x01(\r\x12\x18\n\x10request_async_id\x18\x06 \x01(\x04\x12!\n\x19max_round_trip_latency_ms\x18\x07 \x01(\r\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"\x96\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcError\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x1b\n\x19RegisterRpcMethodResponse\"\x1d\n\x1bUnregisterRpcMethodResponse\"4\n#RpcMethodInvocationResponseResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"_\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcError\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x12\n\nrequest_id\x18\x04 \x02(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x02(\t\x12\x0f\n\x07payload\x18\x06 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x02(\rB\x10\xaa\x02\rLiveKit.Proto') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,23 +25,23 @@ _globals['_RPCERROR']._serialized_start=28 _globals['_RPCERROR']._serialized_end=83 _globals['_PERFORMRPCREQUEST']._serialized_start=86 - _globals['_PERFORMRPCREQUEST']._serialized_end=257 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=259 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=335 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=337 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=415 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=418 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=568 - _globals['_PERFORMRPCRESPONSE']._serialized_start=570 - _globals['_PERFORMRPCRESPONSE']._serialized_end=608 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=610 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=637 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=639 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=668 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=670 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=722 - _globals['_PERFORMRPCCALLBACK']._serialized_start=724 - _globals['_PERFORMRPCCALLBACK']._serialized_end=819 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=822 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1012 + _globals['_PERFORMRPCREQUEST']._serialized_end=292 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=294 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=370 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=372 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=450 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=453 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=603 + _globals['_PERFORMRPCRESPONSE']._serialized_start=605 + _globals['_PERFORMRPCRESPONSE']._serialized_end=643 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=645 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=672 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=674 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=703 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=705 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=757 + _globals['_PERFORMRPCCALLBACK']._serialized_start=759 + _globals['_PERFORMRPCCALLBACK']._serialized_end=854 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=857 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1047 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi index bbed4217..2d35cbae 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -57,12 +57,14 @@ class PerformRpcRequest(google.protobuf.message.Message): PAYLOAD_FIELD_NUMBER: builtins.int RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int REQUEST_ASYNC_ID_FIELD_NUMBER: builtins.int + MAX_ROUND_TRIP_LATENCY_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int destination_identity: builtins.str method: builtins.str payload: builtins.str response_timeout_ms: builtins.int request_async_id: builtins.int + max_round_trip_latency_ms: builtins.int def __init__( self, *, @@ -72,9 +74,10 @@ class PerformRpcRequest(google.protobuf.message.Message): payload: builtins.str | None = ..., response_timeout_ms: builtins.int | None = ..., request_async_id: builtins.int | None = ..., + max_round_trip_latency_ms: builtins.int | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_async_id", b"request_async_id", "response_timeout_ms", b"response_timeout_ms"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_async_id", b"request_async_id", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... + def HasField(self, field_name: typing.Literal["destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "max_round_trip_latency_ms", b"max_round_trip_latency_ms", "method", b"method", "payload", b"payload", "request_async_id", b"request_async_id", "response_timeout_ms", b"response_timeout_ms"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "max_round_trip_latency_ms", b"max_round_trip_latency_ms", "method", b"method", "payload", b"payload", "request_async_id", b"request_async_id", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... global___PerformRpcRequest = PerformRpcRequest diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index fd259ac1..9b1dbdcc 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -324,6 +324,7 @@ async def perform_rpc( method: str, payload: str, response_timeout: Optional[float] = None, + max_round_trip_latency: Optional[float] = None, ) -> str: """ Initiate an RPC call to a remote participant. @@ -333,6 +334,12 @@ async def perform_rpc( method (str): The method name to call payload (str): The method payload response_timeout (Optional[float]): Timeout for receiving a response after initial connection + max_round_trip_latency (float): The maximum amount of time it should ever take for an RPC + request to reach the destination and for the ACK to come back. Defaults to 7 seconds to + account for various relay timeouts and retries in LiveKit Cloud that occur in rare cases. + Most callers should not need to change this, but it can be increased to tolerate + high-latency networks where RPC requests are backed up behind other messages on the + data channel. Returns: str: The response payload @@ -347,6 +354,8 @@ async def perform_rpc( req.perform_rpc.payload = payload if response_timeout is not None: req.perform_rpc.response_timeout_ms = int(response_timeout * 1000) + if max_round_trip_latency is not None: + req.perform_rpc.max_round_trip_latency_ms = int(max_round_trip_latency * 1000) queue = FfiClient.instance.queue.subscribe() try: diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index a4f41cdc..8a0fda59 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit a4f41cdcae5214986ab4ac5a8cb8507e5cc7ee6e +Subproject commit 8a0fda59dd4226be2da7b142078ae5e4f08f260a