enable explicit reconnect to distinguish between WS disconnect vs PeerConnection disconnect

This commit is contained in:
David Zhao
2021-01-30 23:16:11 -08:00
parent 2cf2c448be
commit 320a6c35bf
9 changed files with 87 additions and 69 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ type MessageSource interface {
ReadChan() <-chan proto.Message
}
type ParticipantCallback func(roomName, identity string, requestSource MessageSource, responseSink MessageSink)
type ParticipantCallback func(roomName, identity string, reconnect bool, requestSource MessageSource, responseSink MessageSink)
// Router allows multiple nodes to coordinate the participant session
//counterfeiter:generate . Router
@@ -37,7 +37,7 @@ type Router interface {
ListNodes() ([]*livekit.Node, error)
// participant signal connection is ready to start
StartParticipantSignal(roomName, identity string) (reqSink MessageSink, resSource MessageSource, err error)
StartParticipantSignal(roomName, identity string, reconnect bool) (reqSink MessageSink, resSource MessageSource, err error)
// when a new participant's RTC connection is ready to start
OnNewParticipantRTC(callback ParticipantCallback)