mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 15:22:30 +00:00
Do not send hidden participants after resume (#1689)
This commit is contained in:
1 parent
25d6fd751f
commit
0586009e0d
3 files changed
+17
-13
No files matched your search
@@ -8,7 +8,8 @@
|
||||
|
||||
# LiveKit: Real-time video, audio and data for developers
|
||||
|
||||
[LiveKit](https://livekit.io) is an open source project that provides scalable, multi-user conferencing based on WebRTC. It's designed to provide everything you need to build real-time video audio data capabilities in your applications.
|
||||
[LiveKit](https://livekit.io) is an open source project that provides scalable, multi-user conferencing based on WebRTC.
|
||||
It's designed to provide everything you need to build real-time video audio data capabilities in your applications.
|
||||
|
||||
LiveKit's server is written in Go, using the awesome [Pion WebRTC](https://github.com/pion/webrtc) implementation.
|
||||
|
||||
@@ -41,7 +42,7 @@ https://docs.livekit.io
|
||||
|
||||
## Live Demos
|
||||
|
||||
- [LiveKit Meet](https://meet.livekit.io) ([source](https://github.com/livekit/meet))
|
||||
- [LiveKit Meet](https://meet.livekit.io) ([source](https://github.com/livekit-examples/meet))
|
||||
- [Spatial Audio](https://spatial-audio-demo.livekit.io/) ([source](https://github.com/livekit-examples/spatial-audio))
|
||||
- Livestreaming from OBS Studio ([source](https://github.com/livekit-examples/livestream))
|
||||
|
||||
|
||||
+14
-1
@@ -412,7 +412,8 @@ func (r *Room) ResumeParticipant(p types.LocalParticipant, requestSource routing
|
||||
return err
|
||||
}
|
||||
|
||||
updates := ToProtoParticipants(r.GetParticipants())
|
||||
// include the local participant's info as well, since metadata could have been changed
|
||||
updates := r.getOtherParticipantInfo("")
|
||||
if err := p.SendParticipantUpdate(updates); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -730,6 +731,18 @@ func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScen
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Room) getOtherParticipantInfo(identity livekit.ParticipantIdentity) []*livekit.ParticipantInfo {
|
||||
participants := r.GetParticipants()
|
||||
pi := make([]*livekit.ParticipantInfo, 0, len(participants))
|
||||
for _, p := range participants {
|
||||
if !p.Hidden() && p.Identity() != identity {
|
||||
pi = append(pi, p.ToProto())
|
||||
}
|
||||
}
|
||||
|
||||
return pi
|
||||
}
|
||||
|
||||
// checks if participant should be autosubscribed to new tracks, assumes lock is already acquired
|
||||
func (r *Room) autoSubscribe(participant types.LocalParticipant) bool {
|
||||
opts := r.participantOpts[participant.Identity()]
|
||||
|
||||
@@ -10,8 +10,6 @@ import (
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -45,14 +43,6 @@ func UnpackDataTrackLabel(packed string) (participantID livekit.ParticipantID, t
|
||||
return
|
||||
}
|
||||
|
||||
func ToProtoParticipants(participants []types.LocalParticipant) []*livekit.ParticipantInfo {
|
||||
infos := make([]*livekit.ParticipantInfo, 0, len(participants))
|
||||
for _, op := range participants {
|
||||
infos = append(infos, op.ToProto())
|
||||
}
|
||||
return infos
|
||||
}
|
||||
|
||||
func ToProtoSessionDescription(sd webrtc.SessionDescription) *livekit.SessionDescription {
|
||||
return &livekit.SessionDescription{
|
||||
Type: sd.Type.String(),
|
||||
|
||||
Reference in new issue
Block a user