Support participant identity in permissions (#663)
* Support participant identity in permissions It is harder for clients to update permissions by SID as remote reconnecting means a new SID for that participant. Using participant identity is a better option. For now, participant SID is also supported. Internally, it will get mapped to identity. Server code uses identity throughout after doing any necessary conversion from SID -> Identity. * Address comments
This commit is contained in:
@@ -18,12 +18,13 @@ const (
|
||||
)
|
||||
|
||||
type SubscribedTrackParams struct {
|
||||
PublisherID livekit.ParticipantID
|
||||
PublisherIdentity livekit.ParticipantIdentity
|
||||
SubscriberID livekit.ParticipantID
|
||||
MediaTrack types.MediaTrack
|
||||
DownTrack *sfu.DownTrack
|
||||
AdaptiveStream bool
|
||||
PublisherID livekit.ParticipantID
|
||||
PublisherIdentity livekit.ParticipantIdentity
|
||||
SubscriberID livekit.ParticipantID
|
||||
SubscriberIdentity livekit.ParticipantIdentity
|
||||
MediaTrack types.MediaTrack
|
||||
DownTrack *sfu.DownTrack
|
||||
AdaptiveStream bool
|
||||
}
|
||||
|
||||
type SubscribedTrack struct {
|
||||
@@ -75,6 +76,10 @@ func (t *SubscribedTrack) SubscriberID() livekit.ParticipantID {
|
||||
return t.params.SubscriberID
|
||||
}
|
||||
|
||||
func (t *SubscribedTrack) SubscriberIdentity() livekit.ParticipantIdentity {
|
||||
return t.params.SubscriberIdentity
|
||||
}
|
||||
|
||||
func (t *SubscribedTrack) DownTrack() *sfu.DownTrack {
|
||||
return t.params.DownTrack
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user