Use participantIdentity instead of Sid for track permissions. (#265)

This commit is contained in:
David Zhao
2023-04-09 15:27:27 -07:00
committed by GitHub
parent 8d2220c274
commit 2adeb74aa2
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ extension VideoQualityExt on lk_models.VideoQuality {
extension ParticipantTrackPermissionExt on ParticipantTrackPermission { extension ParticipantTrackPermissionExt on ParticipantTrackPermission {
lk_rtc.TrackPermission toPBType() => lk_rtc.TrackPermission( lk_rtc.TrackPermission toPBType() => lk_rtc.TrackPermission(
participantSid: participantSid, participantIdentity: participantIdentity,
allTracks: allTracksAllowed, allTracks: allTracksAllowed,
trackSids: allowedTrackSids, trackSids: allowedTrackSids,
); );
+4 -4
View File
@@ -150,18 +150,18 @@ class RTCIceServer {
@immutable @immutable
class ParticipantTrackPermission { class ParticipantTrackPermission {
/// The participant id this permission applies to. /// The participant identity this permission applies to.
final String participantSid; final String participantIdentity;
/// If set to true, the target participant can subscribe to all tracks from the local participant. /// If set to true, the target participant can subscribe to all tracks from the local participant.
/// Takes precedence over [allowedTrackSids]. /// Takes precedence over [allowedTrackSids].
final bool allTracksAllowed; final bool allTracksAllowed;
/// The list of track ids that the target participant can subscribe to. /// The list of track ids that the target participant can subscribe to.
final List<String> allowedTrackSids; final List<String>? allowedTrackSids;
const ParticipantTrackPermission( const ParticipantTrackPermission(
this.participantSid, this.participantIdentity,
this.allTracksAllowed, this.allTracksAllowed,
this.allowedTrackSids, this.allowedTrackSids,
); );