Admin APIs for participant management (#13)
* stubs for room admin APIs * room store APIs to persist participants * participant persistence * updated protobufs * implemented APIs to mute/remove/etc * fixed mute handling
This commit is contained in:
+39
-2
@@ -6,13 +6,23 @@ option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
||||
import "model.proto";
|
||||
|
||||
// Room service that can be performed on any node
|
||||
// they are simple HTTP req/responses
|
||||
// they are Twirp-based HTTP req/responses
|
||||
service RoomService {
|
||||
// TODO: how do we secure room service?
|
||||
|
||||
// should be accessible to only internal servers, not external
|
||||
rpc CreateRoom(CreateRoomRequest) returns (Room);
|
||||
rpc ListRooms(ListRoomsRequest) returns (ListRoomsResponse);
|
||||
rpc DeleteRoom(DeleteRoomRequest) returns (DeleteRoomResponse);
|
||||
|
||||
// lists participants in a room, requires RoomAdmin
|
||||
rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse);
|
||||
// get information on a specific participant, requires RoomAdmin
|
||||
rpc GetParticipant(RoomParticipantIdentity) returns (ParticipantInfo);
|
||||
// removes a participant from room, requires RoomAdmin
|
||||
rpc RemoveParticipant(RoomParticipantIdentity) returns (RemoveParticipantResponse);
|
||||
|
||||
// mute/unmute a participant, requires RoomAdmin
|
||||
rpc MutePublishedTrack(MuteRoomTrackRequest) returns (MuteRoomTrackResponse);
|
||||
}
|
||||
|
||||
message CreateRoomRequest {
|
||||
@@ -37,3 +47,30 @@ message DeleteRoomRequest {
|
||||
|
||||
message DeleteRoomResponse {
|
||||
}
|
||||
|
||||
message ListParticipantsRequest {
|
||||
string room = 1;
|
||||
}
|
||||
|
||||
message ListParticipantsResponse {
|
||||
repeated ParticipantInfo participants = 1;
|
||||
}
|
||||
|
||||
message RoomParticipantIdentity {
|
||||
string room = 1;
|
||||
string identity = 2;
|
||||
}
|
||||
|
||||
message RemoveParticipantResponse {
|
||||
}
|
||||
|
||||
message MuteRoomTrackRequest {
|
||||
string room = 1;
|
||||
string identity = 2;
|
||||
string track_sid = 3;
|
||||
bool muted = 4;
|
||||
}
|
||||
|
||||
message MuteRoomTrackResponse {
|
||||
TrackInfo track = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user