mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 19:32:41 +00:00
Signalling V2 protocol implementation start (#3794)
* WIP * name * refactor validate * WIP * WIP * signal cache initial impl * HandleConnect in room manager * generate subscriber offer * handle ConnectRequest as stand alone * segmentation, reassembly * clean up * rearrange * lock scope * support metadata in connect request * prom * add SifTrailer to ConnectResponse * prom for get offer error counter * RtcInit counter * Jie feedback * signal client * consolidate v1 and v2 into SignalClient * clean up * comment * deps * mage generate * fix tests * pass around roomName and participantIdentity * mage generate
This commit is contained in:
1 parent
ba702a5323
commit
b9a44c3fbf
32 files changed
+2300
-395
No files matched your search
@@ -153,8 +153,21 @@ type StartParticipantSignalResults struct {
|
||||
type MessageRouter interface {
|
||||
// CreateRoom starts an rtc room
|
||||
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (res *livekit.Room, err error)
|
||||
|
||||
// StartParticipantSignal participant signal connection is ready to start
|
||||
StartParticipantSignal(ctx context.Context, roomName livekit.RoomName, pi ParticipantInit) (res StartParticipantSignalResults, err error)
|
||||
StartParticipantSignal(
|
||||
ctx context.Context,
|
||||
roomName livekit.RoomName,
|
||||
pi ParticipantInit,
|
||||
) (res StartParticipantSignalResults, err error)
|
||||
|
||||
// HandleParticipantConnectRequest handles connection request from participant
|
||||
HandleParticipantConnectRequest(
|
||||
ctx context.Context,
|
||||
roomName livekit.RoomName,
|
||||
participantIdentity livekit.ParticipantIdentity,
|
||||
rscr *rpc.RelaySignalv2ConnectRequest,
|
||||
) (resp *rpc.RelaySignalv2ConnectResponse, err error)
|
||||
}
|
||||
|
||||
func CreateRouter(
|
||||
@@ -229,10 +242,9 @@ func (pi *ParticipantInit) ToStartSession(roomName livekit.RoomName, connectionI
|
||||
}
|
||||
|
||||
ss := &livekit.StartSession{
|
||||
RoomName: string(roomName),
|
||||
Identity: string(pi.Identity),
|
||||
Name: string(pi.Name),
|
||||
// connection id is to allow the RTC node to identify where to route the message back to
|
||||
RoomName: string(roomName),
|
||||
Identity: string(pi.Identity),
|
||||
Name: string(pi.Name),
|
||||
ConnectionId: string(connectionID),
|
||||
Reconnect: pi.Reconnect,
|
||||
ReconnectReason: pi.ReconnectReason,
|
||||
|
||||
Reference in new issue
Block a user