mirror of
https://github.com/Alexander-D-Karpov/concord.git
synced 2026-03-16 22:04:15 +03:00
108 lines
2.2 KiB
Protocol Buffer
108 lines
2.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package concord.call.v1;
|
|
|
|
option go_package = "github.com/Alexander-D-Karpov/concord/api/gen/go/call/v1;callv1";
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
message JoinVoiceRequest {
|
|
string room_id = 1;
|
|
bool audio_only = 2;
|
|
string preferred_region = 3;
|
|
}
|
|
|
|
message UdpEndpoint {
|
|
string host = 1;
|
|
uint32 port = 2;
|
|
}
|
|
|
|
message CodecHint {
|
|
string audio = 1;
|
|
string video = 2;
|
|
}
|
|
|
|
message CryptoSuite {
|
|
string aead = 1;
|
|
bytes key_id = 2;
|
|
bytes key_material = 3;
|
|
bytes nonce_base = 4;
|
|
}
|
|
|
|
message JoinVoiceResponse {
|
|
UdpEndpoint endpoint = 1;
|
|
string server_id = 2;
|
|
string voice_token = 3;
|
|
CodecHint codec = 4;
|
|
CryptoSuite crypto = 5;
|
|
repeated Participant participants = 6;
|
|
uint32 screen_ssrc = 7;
|
|
}
|
|
|
|
message Participant {
|
|
string user_id = 1;
|
|
uint32 ssrc = 2;
|
|
bool muted = 3;
|
|
bool video_enabled = 4;
|
|
bool screen_sharing = 5;
|
|
uint32 video_ssrc = 6;
|
|
uint32 screen_ssrc = 7;
|
|
}
|
|
|
|
message LeaveVoiceRequest {
|
|
string room_id = 1;
|
|
}
|
|
|
|
message SetMediaPrefsRequest {
|
|
string room_id = 1;
|
|
bool audio_only = 2;
|
|
bool video_enabled = 3;
|
|
bool screen_sharing = 4;
|
|
bool muted = 5;
|
|
}
|
|
|
|
message EmptyResponse {}
|
|
|
|
message GetVoiceStatusRequest {
|
|
string room_id = 1;
|
|
}
|
|
|
|
message VoiceParticipant {
|
|
string user_id = 1;
|
|
bool muted = 2;
|
|
bool video_enabled = 3;
|
|
bool screen_sharing = 4;
|
|
bool speaking = 5;
|
|
google.protobuf.Timestamp joined_at = 6;
|
|
}
|
|
|
|
message GetVoiceStatusResponse {
|
|
repeated VoiceParticipant participants = 1;
|
|
int32 total_participants = 2;
|
|
}
|
|
|
|
service CallService {
|
|
rpc JoinVoice(JoinVoiceRequest) returns (JoinVoiceResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/voice/join"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc LeaveVoice(LeaveVoiceRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/voice/leave"
|
|
};
|
|
}
|
|
rpc SetMediaPrefs(SetMediaPrefsRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
put: "/v1/rooms/{room_id}/voice/prefs"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GetVoiceStatus(GetVoiceStatusRequest) returns (GetVoiceStatusResponse) {
|
|
option (google.api.http) = {
|
|
get: "/v1/rooms/{room_id}/voice"
|
|
};
|
|
}
|
|
} |