Redis AdaptiveStream (#631)

* Redis AdaptiveStream

* Fix adaptive stream while tarnsferring from start session
This commit is contained in:
Raja Subramanian
2022-04-20 10:48:32 +05:30
committed by GitHub
parent 282e2aed49
commit 8535f3d5b9
3 changed files with 16 additions and 14 deletions

2
go.mod
View File

@@ -13,7 +13,7 @@ require (
github.com/google/wire v0.5.0
github.com/gorilla/websocket v1.4.2
github.com/hashicorp/golang-lru v0.5.4
github.com/livekit/protocol v0.13.1-0.20220416150020-cacdaa5bf0e7
github.com/livekit/protocol v0.13.1-0.20220420050803-25b60c4bb050
github.com/mackerelio/go-osstat v0.2.1
github.com/magefile/mage v1.11.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0

4
go.sum
View File

@@ -132,8 +132,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lithammer/shortuuid/v3 v3.0.6 h1:pr15YQyvhiSX/qPxncFtqk+v4xLEpOZObbsY/mKrcvA=
github.com/lithammer/shortuuid/v3 v3.0.6/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts=
github.com/livekit/protocol v0.13.1-0.20220416150020-cacdaa5bf0e7 h1:PUlylnmimMY2TyUdiOuWhJT38kwq1A7Rb2/rW9Hng8g=
github.com/livekit/protocol v0.13.1-0.20220416150020-cacdaa5bf0e7/go.mod h1:3pHsWUtQmWaH8mG0cXrQWpbf3Vo+kj0U+In77CEXu90=
github.com/livekit/protocol v0.13.1-0.20220420050803-25b60c4bb050 h1:0lCx6VdOrt1JJa6w8j2Tljc449G6DNqR8gJbCEyrF8I=
github.com/livekit/protocol v0.13.1-0.20220420050803-25b60c4bb050/go.mod h1:3pHsWUtQmWaH8mG0cXrQWpbf3Vo+kj0U+In77CEXu90=
github.com/mackerelio/go-osstat v0.2.1 h1:5AeAcBEutEErAOlDz6WCkEvm6AKYgHTUQrfwm5RbeQc=
github.com/mackerelio/go-osstat v0.2.1/go.mod h1:UzRL8dMCCTqG5WdRtsxbuljMpZt9PCAGXqxPst5QtaY=
github.com/magefile/mage v1.11.0 h1:C/55Ywp9BpgVVclD3lRnSYCwXTYxmSppIgLeDYlNuls=

View File

@@ -169,11 +169,12 @@ func (r *RedisRouter) StartParticipantSignal(ctx context.Context, roomName livek
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
ConnectionId: string(connectionID),
Reconnect: pi.Reconnect,
AutoSubscribe: pi.AutoSubscribe,
Client: pi.Client,
GrantsJson: string(claims),
ConnectionId: string(connectionID),
Reconnect: pi.Reconnect,
AutoSubscribe: pi.AutoSubscribe,
Client: pi.Client,
GrantsJson: string(claims),
AdaptiveStream: pi.AdaptiveStream,
})
if err != nil {
return
@@ -258,12 +259,13 @@ func (r *RedisRouter) startParticipantRTC(ss *livekit.StartSession, participantK
}
pi := ParticipantInit{
Identity: livekit.ParticipantIdentity(ss.Identity),
Name: livekit.ParticipantName(ss.Name),
Reconnect: ss.Reconnect,
Client: ss.Client,
AutoSubscribe: ss.AutoSubscribe,
Grants: claims,
Identity: livekit.ParticipantIdentity(ss.Identity),
Name: livekit.ParticipantName(ss.Name),
Reconnect: ss.Reconnect,
Client: ss.Client,
AutoSubscribe: ss.AutoSubscribe,
Grants: claims,
AdaptiveStream: ss.AdaptiveStream,
}
reqChan := r.getOrCreateMessageChannel(r.requestChannels, string(participantKey))