Use generic type cast for IDs (#2095)
This commit is contained in:
+2
-2
@@ -549,7 +549,7 @@ func (r *Room) UpdateSubscriptions(
|
||||
}
|
||||
|
||||
for _, pt := range participantTracks {
|
||||
for _, trackID := range livekit.StringsAsTrackIDs(pt.TrackSids) {
|
||||
for _, trackID := range livekit.StringsAsIDs[livekit.TrackID](pt.TrackSids) {
|
||||
if subscribe {
|
||||
participant.SubscribeToTrack(trackID)
|
||||
} else {
|
||||
@@ -600,7 +600,7 @@ func (r *Room) SyncState(participant types.LocalParticipant, state *livekit.Sync
|
||||
|
||||
r.UpdateSubscriptions(
|
||||
participant,
|
||||
livekit.StringsAsTrackIDs(state.Subscription.TrackSids),
|
||||
livekit.StringsAsIDs[livekit.TrackID](state.Subscription.TrackSids),
|
||||
state.Subscription.ParticipantTracks,
|
||||
state.Subscription.Subscribe,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user