diff --git a/proto/rpc/webrtc/v1/signaling.pb.go b/proto/rpc/webrtc/v1/signaling.pb.go index 5228bfe8..16501731 100644 --- a/proto/rpc/webrtc/v1/signaling.pb.go +++ b/proto/rpc/webrtc/v1/signaling.pb.go @@ -23,6 +23,119 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// ICECandidateType represents the type of ICE candidate selected for a WebRTC connection. +type ICECandidateType int32 + +const ( + ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED ICECandidateType = 0 + // ICE_CANDIDATE_TYPE_HOST indicates a direct connection was established. + ICECandidateType_ICE_CANDIDATE_TYPE_HOST ICECandidateType = 1 + // ICE_CANDIDATE_TYPE_STUN indicates a STUN-assisted connection was established. + ICECandidateType_ICE_CANDIDATE_TYPE_STUN ICECandidateType = 2 + // ICE_CANDIDATE_TYPE_COTURN_RELAY indicates relay via Viam's coturn server. + ICECandidateType_ICE_CANDIDATE_TYPE_COTURN_RELAY ICECandidateType = 3 + // ICE_CANDIDATE_TYPE_TWILIO_RELAY indicates relay via Twilio TURN. + ICECandidateType_ICE_CANDIDATE_TYPE_TWILIO_RELAY ICECandidateType = 4 +) + +// Enum value maps for ICECandidateType. +var ( + ICECandidateType_name = map[int32]string{ + 0: "ICE_CANDIDATE_TYPE_UNSPECIFIED", + 1: "ICE_CANDIDATE_TYPE_HOST", + 2: "ICE_CANDIDATE_TYPE_STUN", + 3: "ICE_CANDIDATE_TYPE_COTURN_RELAY", + 4: "ICE_CANDIDATE_TYPE_TWILIO_RELAY", + } + ICECandidateType_value = map[string]int32{ + "ICE_CANDIDATE_TYPE_UNSPECIFIED": 0, + "ICE_CANDIDATE_TYPE_HOST": 1, + "ICE_CANDIDATE_TYPE_STUN": 2, + "ICE_CANDIDATE_TYPE_COTURN_RELAY": 3, + "ICE_CANDIDATE_TYPE_TWILIO_RELAY": 4, + } +) + +func (x ICECandidateType) Enum() *ICECandidateType { + p := new(ICECandidateType) + *p = x + return p +} + +func (x ICECandidateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ICECandidateType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_rpc_webrtc_v1_signaling_proto_enumTypes[0].Descriptor() +} + +func (ICECandidateType) Type() protoreflect.EnumType { + return &file_proto_rpc_webrtc_v1_signaling_proto_enumTypes[0] +} + +func (x ICECandidateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ICECandidateType.Descriptor instead. +func (ICECandidateType) EnumDescriptor() ([]byte, []int) { + return file_proto_rpc_webrtc_v1_signaling_proto_rawDescGZIP(), []int{0} +} + +// SDKType represents the Viam SDK used to establish the connection. +type SDKType int32 + +const ( + SDKType_SDK_TYPE_UNSPECIFIED SDKType = 0 + SDKType_SDK_TYPE_GO SDKType = 1 + SDKType_SDK_TYPE_TYPESCRIPT SDKType = 2 + SDKType_SDK_TYPE_PYTHON_CPP SDKType = 3 +) + +// Enum value maps for SDKType. +var ( + SDKType_name = map[int32]string{ + 0: "SDK_TYPE_UNSPECIFIED", + 1: "SDK_TYPE_GO", + 2: "SDK_TYPE_TYPESCRIPT", + 3: "SDK_TYPE_PYTHON_CPP", + } + SDKType_value = map[string]int32{ + "SDK_TYPE_UNSPECIFIED": 0, + "SDK_TYPE_GO": 1, + "SDK_TYPE_TYPESCRIPT": 2, + "SDK_TYPE_PYTHON_CPP": 3, + } +) + +func (x SDKType) Enum() *SDKType { + p := new(SDKType) + *p = x + return p +} + +func (x SDKType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SDKType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_rpc_webrtc_v1_signaling_proto_enumTypes[1].Descriptor() +} + +func (SDKType) Type() protoreflect.EnumType { + return &file_proto_rpc_webrtc_v1_signaling_proto_enumTypes[1] +} + +func (x SDKType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SDKType.Descriptor instead. +func (SDKType) EnumDescriptor() ([]byte, []int) { + return file_proto_rpc_webrtc_v1_signaling_proto_rawDescGZIP(), []int{1} +} + // ICECandidate represents an ICE candidate. // From https://github.com/pion/webrtc/blob/5f6baf73255598a7b4a7c9400bb0381acc9aa3dc/icecandidateinit.go type ICECandidate struct { @@ -1334,6 +1447,97 @@ func (x *OptionalWebRTCConfigResponse) GetConfig() *WebRTCConfig { return nil } +// ReportConnectionMetadataRequest reports metadata about an established WebRTC connection. +type ReportConnectionMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CandidateType ICECandidateType `protobuf:"varint,1,opt,name=candidate_type,json=candidateType,proto3,enum=proto.rpc.webrtc.v1.ICECandidateType" json:"candidate_type,omitempty"` + SdkType SDKType `protobuf:"varint,2,opt,name=sdk_type,json=sdkType,proto3,enum=proto.rpc.webrtc.v1.SDKType" json:"sdk_type,omitempty"` +} + +func (x *ReportConnectionMetadataRequest) Reset() { + *x = ReportConnectionMetadataRequest{} + mi := &file_proto_rpc_webrtc_v1_signaling_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReportConnectionMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportConnectionMetadataRequest) ProtoMessage() {} + +func (x *ReportConnectionMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_webrtc_v1_signaling_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportConnectionMetadataRequest.ProtoReflect.Descriptor instead. +func (*ReportConnectionMetadataRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_webrtc_v1_signaling_proto_rawDescGZIP(), []int{22} +} + +func (x *ReportConnectionMetadataRequest) GetCandidateType() ICECandidateType { + if x != nil { + return x.CandidateType + } + return ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED +} + +func (x *ReportConnectionMetadataRequest) GetSdkType() SDKType { + if x != nil { + return x.SdkType + } + return SDKType_SDK_TYPE_UNSPECIFIED +} + +// ReportConnectionMetadataResponse is empty. +type ReportConnectionMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReportConnectionMetadataResponse) Reset() { + *x = ReportConnectionMetadataResponse{} + mi := &file_proto_rpc_webrtc_v1_signaling_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReportConnectionMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportConnectionMetadataResponse) ProtoMessage() {} + +func (x *ReportConnectionMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_webrtc_v1_signaling_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportConnectionMetadataResponse.ProtoReflect.Descriptor instead. +func (*ReportConnectionMetadataResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_webrtc_v1_signaling_proto_rawDescGZIP(), []int{23} +} + var File_proto_rpc_webrtc_v1_signaling_proto protoreflect.FileDescriptor var file_proto_rpc_webrtc_v1_signaling_proto_rawDesc = []byte{ @@ -1507,42 +1711,85 @@ var file_proto_rpc_webrtc_v1_signaling_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x32, 0x86, 0x04, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x20, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, - 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x30, - 0x01, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, - 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x1a, 0x1a, 0x2f, 0x72, 0x70, 0x63, 0x2f, - 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, - 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, - 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x73, 0x77, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0xaa, 0x01, 0x0a, - 0x14, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x27, 0x12, 0x25, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x62, 0x72, - 0x74, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x6f, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xa8, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x64, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x44, 0x4b, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x73, 0x64, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x22, 0x0a, 0x20, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, + 0xba, 0x01, 0x0a, 0x10, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x49, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x44, + 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x43, 0x45, 0x5f, + 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, + 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, + 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x55, 0x4e, + 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, + 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x54, 0x55, 0x52, 0x4e, 0x5f, + 0x52, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x43, 0x45, 0x5f, 0x43, + 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x57, + 0x49, 0x4c, 0x49, 0x4f, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x04, 0x2a, 0x66, 0x0a, 0x07, + 0x53, 0x44, 0x4b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x44, 0x4b, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x44, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x4f, + 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x44, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, + 0x44, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x5f, 0x43, + 0x50, 0x50, 0x10, 0x03, 0x32, 0xc3, 0x05, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x04, 0x43, 0x61, 0x6c, + 0x6c, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, + 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x61, 0x6c, 0x6c, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x1a, 0x1a, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, + 0x6c, 0x6c, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x41, 0x6e, 0x73, + 0x77, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, + 0x12, 0xaa, 0x01, 0x0a, 0x14, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, + 0x52, 0x54, 0x43, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, + 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xba, 0x01, + 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x77, 0x65, 0x62, + 0x72, 0x74, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, + 0x29, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x6f, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1557,69 +1804,78 @@ func file_proto_rpc_webrtc_v1_signaling_proto_rawDescGZIP() []byte { return file_proto_rpc_webrtc_v1_signaling_proto_rawDescData } -var file_proto_rpc_webrtc_v1_signaling_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_proto_rpc_webrtc_v1_signaling_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_rpc_webrtc_v1_signaling_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_proto_rpc_webrtc_v1_signaling_proto_goTypes = []any{ - (*ICECandidate)(nil), // 0: proto.rpc.webrtc.v1.ICECandidate - (*CallRequest)(nil), // 1: proto.rpc.webrtc.v1.CallRequest - (*CallResponseInitStage)(nil), // 2: proto.rpc.webrtc.v1.CallResponseInitStage - (*CallResponseUpdateStage)(nil), // 3: proto.rpc.webrtc.v1.CallResponseUpdateStage - (*CallResponse)(nil), // 4: proto.rpc.webrtc.v1.CallResponse - (*CallUpdateRequest)(nil), // 5: proto.rpc.webrtc.v1.CallUpdateRequest - (*CallUpdateResponse)(nil), // 6: proto.rpc.webrtc.v1.CallUpdateResponse - (*ICEServer)(nil), // 7: proto.rpc.webrtc.v1.ICEServer - (*WebRTCConfig)(nil), // 8: proto.rpc.webrtc.v1.WebRTCConfig - (*AnswerRequestInitStage)(nil), // 9: proto.rpc.webrtc.v1.AnswerRequestInitStage - (*AnswerRequestUpdateStage)(nil), // 10: proto.rpc.webrtc.v1.AnswerRequestUpdateStage - (*AnswerRequestDoneStage)(nil), // 11: proto.rpc.webrtc.v1.AnswerRequestDoneStage - (*AnswerRequestErrorStage)(nil), // 12: proto.rpc.webrtc.v1.AnswerRequestErrorStage - (*AnswerRequestHeartbeatStage)(nil), // 13: proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage - (*AnswerRequest)(nil), // 14: proto.rpc.webrtc.v1.AnswerRequest - (*AnswerResponseInitStage)(nil), // 15: proto.rpc.webrtc.v1.AnswerResponseInitStage - (*AnswerResponseUpdateStage)(nil), // 16: proto.rpc.webrtc.v1.AnswerResponseUpdateStage - (*AnswerResponseDoneStage)(nil), // 17: proto.rpc.webrtc.v1.AnswerResponseDoneStage - (*AnswerResponseErrorStage)(nil), // 18: proto.rpc.webrtc.v1.AnswerResponseErrorStage - (*AnswerResponse)(nil), // 19: proto.rpc.webrtc.v1.AnswerResponse - (*OptionalWebRTCConfigRequest)(nil), // 20: proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest - (*OptionalWebRTCConfigResponse)(nil), // 21: proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse - (*status.Status)(nil), // 22: google.rpc.Status - (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (ICECandidateType)(0), // 0: proto.rpc.webrtc.v1.ICECandidateType + (SDKType)(0), // 1: proto.rpc.webrtc.v1.SDKType + (*ICECandidate)(nil), // 2: proto.rpc.webrtc.v1.ICECandidate + (*CallRequest)(nil), // 3: proto.rpc.webrtc.v1.CallRequest + (*CallResponseInitStage)(nil), // 4: proto.rpc.webrtc.v1.CallResponseInitStage + (*CallResponseUpdateStage)(nil), // 5: proto.rpc.webrtc.v1.CallResponseUpdateStage + (*CallResponse)(nil), // 6: proto.rpc.webrtc.v1.CallResponse + (*CallUpdateRequest)(nil), // 7: proto.rpc.webrtc.v1.CallUpdateRequest + (*CallUpdateResponse)(nil), // 8: proto.rpc.webrtc.v1.CallUpdateResponse + (*ICEServer)(nil), // 9: proto.rpc.webrtc.v1.ICEServer + (*WebRTCConfig)(nil), // 10: proto.rpc.webrtc.v1.WebRTCConfig + (*AnswerRequestInitStage)(nil), // 11: proto.rpc.webrtc.v1.AnswerRequestInitStage + (*AnswerRequestUpdateStage)(nil), // 12: proto.rpc.webrtc.v1.AnswerRequestUpdateStage + (*AnswerRequestDoneStage)(nil), // 13: proto.rpc.webrtc.v1.AnswerRequestDoneStage + (*AnswerRequestErrorStage)(nil), // 14: proto.rpc.webrtc.v1.AnswerRequestErrorStage + (*AnswerRequestHeartbeatStage)(nil), // 15: proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage + (*AnswerRequest)(nil), // 16: proto.rpc.webrtc.v1.AnswerRequest + (*AnswerResponseInitStage)(nil), // 17: proto.rpc.webrtc.v1.AnswerResponseInitStage + (*AnswerResponseUpdateStage)(nil), // 18: proto.rpc.webrtc.v1.AnswerResponseUpdateStage + (*AnswerResponseDoneStage)(nil), // 19: proto.rpc.webrtc.v1.AnswerResponseDoneStage + (*AnswerResponseErrorStage)(nil), // 20: proto.rpc.webrtc.v1.AnswerResponseErrorStage + (*AnswerResponse)(nil), // 21: proto.rpc.webrtc.v1.AnswerResponse + (*OptionalWebRTCConfigRequest)(nil), // 22: proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest + (*OptionalWebRTCConfigResponse)(nil), // 23: proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse + (*ReportConnectionMetadataRequest)(nil), // 24: proto.rpc.webrtc.v1.ReportConnectionMetadataRequest + (*ReportConnectionMetadataResponse)(nil), // 25: proto.rpc.webrtc.v1.ReportConnectionMetadataResponse + (*status.Status)(nil), // 26: google.rpc.Status + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp } var file_proto_rpc_webrtc_v1_signaling_proto_depIdxs = []int32{ - 0, // 0: proto.rpc.webrtc.v1.CallResponseUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate - 2, // 1: proto.rpc.webrtc.v1.CallResponse.init:type_name -> proto.rpc.webrtc.v1.CallResponseInitStage - 3, // 2: proto.rpc.webrtc.v1.CallResponse.update:type_name -> proto.rpc.webrtc.v1.CallResponseUpdateStage - 0, // 3: proto.rpc.webrtc.v1.CallUpdateRequest.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate - 22, // 4: proto.rpc.webrtc.v1.CallUpdateRequest.error:type_name -> google.rpc.Status - 7, // 5: proto.rpc.webrtc.v1.WebRTCConfig.additional_ice_servers:type_name -> proto.rpc.webrtc.v1.ICEServer - 8, // 6: proto.rpc.webrtc.v1.AnswerRequestInitStage.optional_config:type_name -> proto.rpc.webrtc.v1.WebRTCConfig - 23, // 7: proto.rpc.webrtc.v1.AnswerRequestInitStage.deadline:type_name -> google.protobuf.Timestamp - 0, // 8: proto.rpc.webrtc.v1.AnswerRequestUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate - 22, // 9: proto.rpc.webrtc.v1.AnswerRequestErrorStage.status:type_name -> google.rpc.Status - 9, // 10: proto.rpc.webrtc.v1.AnswerRequest.init:type_name -> proto.rpc.webrtc.v1.AnswerRequestInitStage - 10, // 11: proto.rpc.webrtc.v1.AnswerRequest.update:type_name -> proto.rpc.webrtc.v1.AnswerRequestUpdateStage - 11, // 12: proto.rpc.webrtc.v1.AnswerRequest.done:type_name -> proto.rpc.webrtc.v1.AnswerRequestDoneStage - 12, // 13: proto.rpc.webrtc.v1.AnswerRequest.error:type_name -> proto.rpc.webrtc.v1.AnswerRequestErrorStage - 13, // 14: proto.rpc.webrtc.v1.AnswerRequest.heartbeat:type_name -> proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage - 0, // 15: proto.rpc.webrtc.v1.AnswerResponseUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate - 22, // 16: proto.rpc.webrtc.v1.AnswerResponseErrorStage.status:type_name -> google.rpc.Status - 15, // 17: proto.rpc.webrtc.v1.AnswerResponse.init:type_name -> proto.rpc.webrtc.v1.AnswerResponseInitStage - 16, // 18: proto.rpc.webrtc.v1.AnswerResponse.update:type_name -> proto.rpc.webrtc.v1.AnswerResponseUpdateStage - 17, // 19: proto.rpc.webrtc.v1.AnswerResponse.done:type_name -> proto.rpc.webrtc.v1.AnswerResponseDoneStage - 18, // 20: proto.rpc.webrtc.v1.AnswerResponse.error:type_name -> proto.rpc.webrtc.v1.AnswerResponseErrorStage - 8, // 21: proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse.config:type_name -> proto.rpc.webrtc.v1.WebRTCConfig - 1, // 22: proto.rpc.webrtc.v1.SignalingService.Call:input_type -> proto.rpc.webrtc.v1.CallRequest - 5, // 23: proto.rpc.webrtc.v1.SignalingService.CallUpdate:input_type -> proto.rpc.webrtc.v1.CallUpdateRequest - 19, // 24: proto.rpc.webrtc.v1.SignalingService.Answer:input_type -> proto.rpc.webrtc.v1.AnswerResponse - 20, // 25: proto.rpc.webrtc.v1.SignalingService.OptionalWebRTCConfig:input_type -> proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest - 4, // 26: proto.rpc.webrtc.v1.SignalingService.Call:output_type -> proto.rpc.webrtc.v1.CallResponse - 6, // 27: proto.rpc.webrtc.v1.SignalingService.CallUpdate:output_type -> proto.rpc.webrtc.v1.CallUpdateResponse - 14, // 28: proto.rpc.webrtc.v1.SignalingService.Answer:output_type -> proto.rpc.webrtc.v1.AnswerRequest - 21, // 29: proto.rpc.webrtc.v1.SignalingService.OptionalWebRTCConfig:output_type -> proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse - 26, // [26:30] is the sub-list for method output_type - 22, // [22:26] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 2, // 0: proto.rpc.webrtc.v1.CallResponseUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate + 4, // 1: proto.rpc.webrtc.v1.CallResponse.init:type_name -> proto.rpc.webrtc.v1.CallResponseInitStage + 5, // 2: proto.rpc.webrtc.v1.CallResponse.update:type_name -> proto.rpc.webrtc.v1.CallResponseUpdateStage + 2, // 3: proto.rpc.webrtc.v1.CallUpdateRequest.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate + 26, // 4: proto.rpc.webrtc.v1.CallUpdateRequest.error:type_name -> google.rpc.Status + 9, // 5: proto.rpc.webrtc.v1.WebRTCConfig.additional_ice_servers:type_name -> proto.rpc.webrtc.v1.ICEServer + 10, // 6: proto.rpc.webrtc.v1.AnswerRequestInitStage.optional_config:type_name -> proto.rpc.webrtc.v1.WebRTCConfig + 27, // 7: proto.rpc.webrtc.v1.AnswerRequestInitStage.deadline:type_name -> google.protobuf.Timestamp + 2, // 8: proto.rpc.webrtc.v1.AnswerRequestUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate + 26, // 9: proto.rpc.webrtc.v1.AnswerRequestErrorStage.status:type_name -> google.rpc.Status + 11, // 10: proto.rpc.webrtc.v1.AnswerRequest.init:type_name -> proto.rpc.webrtc.v1.AnswerRequestInitStage + 12, // 11: proto.rpc.webrtc.v1.AnswerRequest.update:type_name -> proto.rpc.webrtc.v1.AnswerRequestUpdateStage + 13, // 12: proto.rpc.webrtc.v1.AnswerRequest.done:type_name -> proto.rpc.webrtc.v1.AnswerRequestDoneStage + 14, // 13: proto.rpc.webrtc.v1.AnswerRequest.error:type_name -> proto.rpc.webrtc.v1.AnswerRequestErrorStage + 15, // 14: proto.rpc.webrtc.v1.AnswerRequest.heartbeat:type_name -> proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage + 2, // 15: proto.rpc.webrtc.v1.AnswerResponseUpdateStage.candidate:type_name -> proto.rpc.webrtc.v1.ICECandidate + 26, // 16: proto.rpc.webrtc.v1.AnswerResponseErrorStage.status:type_name -> google.rpc.Status + 17, // 17: proto.rpc.webrtc.v1.AnswerResponse.init:type_name -> proto.rpc.webrtc.v1.AnswerResponseInitStage + 18, // 18: proto.rpc.webrtc.v1.AnswerResponse.update:type_name -> proto.rpc.webrtc.v1.AnswerResponseUpdateStage + 19, // 19: proto.rpc.webrtc.v1.AnswerResponse.done:type_name -> proto.rpc.webrtc.v1.AnswerResponseDoneStage + 20, // 20: proto.rpc.webrtc.v1.AnswerResponse.error:type_name -> proto.rpc.webrtc.v1.AnswerResponseErrorStage + 10, // 21: proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse.config:type_name -> proto.rpc.webrtc.v1.WebRTCConfig + 0, // 22: proto.rpc.webrtc.v1.ReportConnectionMetadataRequest.candidate_type:type_name -> proto.rpc.webrtc.v1.ICECandidateType + 1, // 23: proto.rpc.webrtc.v1.ReportConnectionMetadataRequest.sdk_type:type_name -> proto.rpc.webrtc.v1.SDKType + 3, // 24: proto.rpc.webrtc.v1.SignalingService.Call:input_type -> proto.rpc.webrtc.v1.CallRequest + 7, // 25: proto.rpc.webrtc.v1.SignalingService.CallUpdate:input_type -> proto.rpc.webrtc.v1.CallUpdateRequest + 21, // 26: proto.rpc.webrtc.v1.SignalingService.Answer:input_type -> proto.rpc.webrtc.v1.AnswerResponse + 22, // 27: proto.rpc.webrtc.v1.SignalingService.OptionalWebRTCConfig:input_type -> proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest + 24, // 28: proto.rpc.webrtc.v1.SignalingService.ReportConnectionMetadata:input_type -> proto.rpc.webrtc.v1.ReportConnectionMetadataRequest + 6, // 29: proto.rpc.webrtc.v1.SignalingService.Call:output_type -> proto.rpc.webrtc.v1.CallResponse + 8, // 30: proto.rpc.webrtc.v1.SignalingService.CallUpdate:output_type -> proto.rpc.webrtc.v1.CallUpdateResponse + 16, // 31: proto.rpc.webrtc.v1.SignalingService.Answer:output_type -> proto.rpc.webrtc.v1.AnswerRequest + 23, // 32: proto.rpc.webrtc.v1.SignalingService.OptionalWebRTCConfig:output_type -> proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse + 25, // 33: proto.rpc.webrtc.v1.SignalingService.ReportConnectionMetadata:output_type -> proto.rpc.webrtc.v1.ReportConnectionMetadataResponse + 29, // [29:34] is the sub-list for method output_type + 24, // [24:29] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_proto_rpc_webrtc_v1_signaling_proto_init() } @@ -1656,13 +1912,14 @@ func file_proto_rpc_webrtc_v1_signaling_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_webrtc_v1_signaling_proto_rawDesc, - NumEnums: 0, - NumMessages: 22, + NumEnums: 2, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, GoTypes: file_proto_rpc_webrtc_v1_signaling_proto_goTypes, DependencyIndexes: file_proto_rpc_webrtc_v1_signaling_proto_depIdxs, + EnumInfos: file_proto_rpc_webrtc_v1_signaling_proto_enumTypes, MessageInfos: file_proto_rpc_webrtc_v1_signaling_proto_msgTypes, }.Build() File_proto_rpc_webrtc_v1_signaling_proto = out.File diff --git a/proto/rpc/webrtc/v1/signaling.pb.gw.go b/proto/rpc/webrtc/v1/signaling.pb.gw.go index 5c5af82a..5d992265 100644 --- a/proto/rpc/webrtc/v1/signaling.pb.gw.go +++ b/proto/rpc/webrtc/v1/signaling.pb.gw.go @@ -156,6 +156,42 @@ func local_request_SignalingService_OptionalWebRTCConfig_0(ctx context.Context, } +var ( + filter_SignalingService_ReportConnectionMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SignalingService_ReportConnectionMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client SignalingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReportConnectionMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SignalingService_ReportConnectionMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ReportConnectionMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SignalingService_ReportConnectionMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server SignalingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReportConnectionMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SignalingService_ReportConnectionMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReportConnectionMetadata(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSignalingServiceHandlerServer registers the http handlers for service SignalingService to "mux". // UnaryRPC :call SignalingServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -226,6 +262,31 @@ func RegisterSignalingServiceHandlerServer(ctx context.Context, mux *runtime.Ser }) + mux.Handle("POST", pattern_SignalingService_ReportConnectionMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/proto.rpc.webrtc.v1.SignalingService/ReportConnectionMetadata", runtime.WithHTTPPathPattern("/rpc/webrtc/v1/report_connection_metadata")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SignalingService_ReportConnectionMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SignalingService_ReportConnectionMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -355,6 +416,28 @@ func RegisterSignalingServiceHandlerClient(ctx context.Context, mux *runtime.Ser }) + mux.Handle("POST", pattern_SignalingService_ReportConnectionMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/proto.rpc.webrtc.v1.SignalingService/ReportConnectionMetadata", runtime.WithHTTPPathPattern("/rpc/webrtc/v1/report_connection_metadata")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SignalingService_ReportConnectionMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SignalingService_ReportConnectionMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -366,6 +449,8 @@ var ( pattern_SignalingService_Answer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"proto.rpc.webrtc.v1.SignalingService", "Answer"}, "")) pattern_SignalingService_OptionalWebRTCConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"rpc", "webrtc", "v1", "optional_webrtc_config"}, "")) + + pattern_SignalingService_ReportConnectionMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"rpc", "webrtc", "v1", "report_connection_metadata"}, "")) ) var ( @@ -376,4 +461,6 @@ var ( forward_SignalingService_Answer_0 = runtime.ForwardResponseStream forward_SignalingService_OptionalWebRTCConfig_0 = runtime.ForwardResponseMessage + + forward_SignalingService_ReportConnectionMetadata_0 = runtime.ForwardResponseMessage ) diff --git a/proto/rpc/webrtc/v1/signaling.proto b/proto/rpc/webrtc/v1/signaling.proto index 0c309aa6..d2f18831 100644 --- a/proto/rpc/webrtc/v1/signaling.proto +++ b/proto/rpc/webrtc/v1/signaling.proto @@ -47,6 +47,15 @@ service SignalingService { get: "/rpc/webrtc/v1/optional_webrtc_config" }; } + + // ReportConnectionMetadata reports metadata about an established WebRTC connection, + // including the selected ICE candidate type and the SDK used. The host must be in + // the rpc-host metadata field. + rpc ReportConnectionMetadata(ReportConnectionMetadataRequest) returns (ReportConnectionMetadataResponse) { + option (google.api.http) = { + post: "/rpc/webrtc/v1/report_connection_metadata" + }; + } } // ICECandidate represents an ICE candidate. @@ -211,4 +220,33 @@ message OptionalWebRTCConfigResponse { WebRTCConfig config = 1; } +// ICECandidateType represents the type of ICE candidate selected for a WebRTC connection. +enum ICECandidateType { + ICE_CANDIDATE_TYPE_UNSPECIFIED = 0; + // ICE_CANDIDATE_TYPE_HOST indicates a direct connection was established. + ICE_CANDIDATE_TYPE_HOST = 1; + // ICE_CANDIDATE_TYPE_STUN indicates a STUN-assisted connection was established. + ICE_CANDIDATE_TYPE_STUN = 2; + // ICE_CANDIDATE_TYPE_COTURN_RELAY indicates relay via Viam's coturn server. + ICE_CANDIDATE_TYPE_COTURN_RELAY = 3; + // ICE_CANDIDATE_TYPE_TWILIO_RELAY indicates relay via Twilio TURN. + ICE_CANDIDATE_TYPE_TWILIO_RELAY = 4; +} + +// SDKType represents the Viam SDK used to establish the connection. +enum SDKType { + SDK_TYPE_UNSPECIFIED = 0; + SDK_TYPE_GO = 1; + SDK_TYPE_TYPESCRIPT = 2; + SDK_TYPE_PYTHON_CPP = 3; +} +// ReportConnectionMetadataRequest reports metadata about an established WebRTC connection. +message ReportConnectionMetadataRequest { + ICECandidateType candidate_type = 1; + SDKType sdk_type = 2; +} + +// ReportConnectionMetadataResponse is empty. +message ReportConnectionMetadataResponse { +} diff --git a/proto/rpc/webrtc/v1/signaling_grpc.pb.go b/proto/rpc/webrtc/v1/signaling_grpc.pb.go index edfcbe0e..28d84230 100644 --- a/proto/rpc/webrtc/v1/signaling_grpc.pb.go +++ b/proto/rpc/webrtc/v1/signaling_grpc.pb.go @@ -19,10 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - SignalingService_Call_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/Call" - SignalingService_CallUpdate_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/CallUpdate" - SignalingService_Answer_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/Answer" - SignalingService_OptionalWebRTCConfig_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/OptionalWebRTCConfig" + SignalingService_Call_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/Call" + SignalingService_CallUpdate_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/CallUpdate" + SignalingService_Answer_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/Answer" + SignalingService_OptionalWebRTCConfig_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/OptionalWebRTCConfig" + SignalingService_ReportConnectionMetadata_FullMethodName = "/proto.rpc.webrtc.v1.SignalingService/ReportConnectionMetadata" ) // SignalingServiceClient is the client API for SignalingService service. @@ -54,6 +55,10 @@ type SignalingServiceClient interface { // OptionalWebRTCConfig returns any WebRTC configuration the caller may want to use. // The host to get a config for must be in the rpc-host metadata field. OptionalWebRTCConfig(ctx context.Context, in *OptionalWebRTCConfigRequest, opts ...grpc.CallOption) (*OptionalWebRTCConfigResponse, error) + // ReportConnectionMetadata reports metadata about an established WebRTC connection, + // including the selected ICE candidate type and the SDK used. The host must be in + // the rpc-host metadata field. + ReportConnectionMetadata(ctx context.Context, in *ReportConnectionMetadataRequest, opts ...grpc.CallOption) (*ReportConnectionMetadataResponse, error) } type signalingServiceClient struct { @@ -116,6 +121,16 @@ func (c *signalingServiceClient) OptionalWebRTCConfig(ctx context.Context, in *O return out, nil } +func (c *signalingServiceClient) ReportConnectionMetadata(ctx context.Context, in *ReportConnectionMetadataRequest, opts ...grpc.CallOption) (*ReportConnectionMetadataResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReportConnectionMetadataResponse) + err := c.cc.Invoke(ctx, SignalingService_ReportConnectionMetadata_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // SignalingServiceServer is the server API for SignalingService service. // All implementations must embed UnimplementedSignalingServiceServer // for forward compatibility. @@ -145,6 +160,10 @@ type SignalingServiceServer interface { // OptionalWebRTCConfig returns any WebRTC configuration the caller may want to use. // The host to get a config for must be in the rpc-host metadata field. OptionalWebRTCConfig(context.Context, *OptionalWebRTCConfigRequest) (*OptionalWebRTCConfigResponse, error) + // ReportConnectionMetadata reports metadata about an established WebRTC connection, + // including the selected ICE candidate type and the SDK used. The host must be in + // the rpc-host metadata field. + ReportConnectionMetadata(context.Context, *ReportConnectionMetadataRequest) (*ReportConnectionMetadataResponse, error) mustEmbedUnimplementedSignalingServiceServer() } @@ -167,6 +186,9 @@ func (UnimplementedSignalingServiceServer) Answer(grpc.BidiStreamingServer[Answe func (UnimplementedSignalingServiceServer) OptionalWebRTCConfig(context.Context, *OptionalWebRTCConfigRequest) (*OptionalWebRTCConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OptionalWebRTCConfig not implemented") } +func (UnimplementedSignalingServiceServer) ReportConnectionMetadata(context.Context, *ReportConnectionMetadataRequest) (*ReportConnectionMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportConnectionMetadata not implemented") +} func (UnimplementedSignalingServiceServer) mustEmbedUnimplementedSignalingServiceServer() {} func (UnimplementedSignalingServiceServer) testEmbeddedByValue() {} @@ -242,6 +264,24 @@ func _SignalingService_OptionalWebRTCConfig_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } +func _SignalingService_ReportConnectionMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportConnectionMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SignalingServiceServer).ReportConnectionMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SignalingService_ReportConnectionMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SignalingServiceServer).ReportConnectionMetadata(ctx, req.(*ReportConnectionMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SignalingService_ServiceDesc is the grpc.ServiceDesc for SignalingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -257,6 +297,10 @@ var SignalingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "OptionalWebRTCConfig", Handler: _SignalingService_OptionalWebRTCConfig_Handler, }, + { + MethodName: "ReportConnectionMetadata", + Handler: _SignalingService_ReportConnectionMetadata_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/rpc/wrtc_client.go b/rpc/wrtc_client.go index 74f8f8e6..ba480dd4 100644 --- a/rpc/wrtc_client.go +++ b/rpc/wrtc_client.go @@ -3,6 +3,7 @@ package rpc import ( "context" "io" + "strings" "sync" "testing" "time" @@ -400,6 +401,8 @@ func dialWebRTC( sendDone() successful = true + reportConnectionMetadata(ctx, host, signalingClient, peerConn, logger) + // Ensure the exchange goroutine has exited. exchangeCancel(nil) <-exchangeCtx.Done() @@ -458,3 +461,71 @@ func dialSignalingServer( conn, _, err := dialDirectGRPC(ctx, signalingServer, dOpts, logger) return conn, err } + +// reportConnectionMetadata reports WebRTC connection metadata to the signaling server. +func reportConnectionMetadata( + ctx context.Context, + host string, + signalingClient webrtcpb.SignalingServiceClient, + peerConn *webrtc.PeerConnection, + logger utils.ZapCompatibleLogger, +) { + candidateType := selectedICECandidateType(peerConn.GetStats()) + + reportCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + reportCtx = metadata.NewOutgoingContext(reportCtx, metadata.New(map[string]string{RPCHostMetadataField: host})) + + if _, err := signalingClient.ReportConnectionMetadata(reportCtx, &webrtcpb.ReportConnectionMetadataRequest{ + CandidateType: candidateType, + SdkType: webrtcpb.SDKType_SDK_TYPE_GO, + }); err != nil { + logger.Debugw("failed to report connection metadata", "err", err) + } +} + +// selectedICECandidateType inspects a WebRTC stats report to determine which ICE candidate type +// was selected for the connection. It finds the nominated candidate pair and examines the remote +// candidate to classify the connection. +func selectedICECandidateType(stats webrtc.StatsReport) webrtcpb.ICECandidateType { + // Find the nominated candidate pair and get its remote candidate ID. + remoteCandID := "" + for _, stat := range stats { + pair, ok := stat.(webrtc.ICECandidatePairStats) + if !ok || !pair.Nominated { + continue + } + remoteCandID = pair.RemoteCandidateID + break + } + if remoteCandID == "" { + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED + } + + remoteStat, ok := stats[remoteCandID] + if !ok { + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED + } + remoteCand, ok := remoteStat.(webrtc.ICECandidateStats) + if !ok { + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED + } + + switch remoteCand.CandidateType { + case webrtc.ICECandidateTypeHost: + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_HOST + case webrtc.ICECandidateTypeSrflx, webrtc.ICECandidateTypePrflx: + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_STUN + case webrtc.ICECandidateTypeRelay: + // Distinguish Viam's coturn server from Twilio (or other external) TURN servers by URL. + if remoteCand.URL == "" { + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED + } + if strings.Contains(remoteCand.URL, "viam.com") { + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_COTURN_RELAY + } + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_TWILIO_RELAY + } + + return webrtcpb.ICECandidateType_ICE_CANDIDATE_TYPE_UNSPECIFIED +}