polite-oil-10264
09/23/2025, 3:47 PMtall-airline-16756
09/23/2025, 3:47 PMtall-airline-16756
09/23/2025, 3:48 PMallParticipantsAllowed to true.
• For more detailed control, make sure the setTrackSubscriptionPermissions method clearly includes permissions for the participants and tracks you want. For example:
localParticipant.setTrackSubscriptionPermissions(false, [
{ participantIdentity: 'p1', allTracksAllowed: true },
{ participantIdentity: 'p2', trackSids: ['audio'] }
]);
Just a heads-up: when both allParticipantsAllowed and allTracksAllowed are set to false, new tracks won’t automatically grant subscription permissions. You’ll need to update the permissions to include those new tracks.
Please feel free to reach out if you’d like me to walk you through this or if you have any other questions—I’m here to help!
Sources: Sources/LiveKit/Core/SignalClient.swift | pkg/rtc/uptrackmanager.go | Managing participants | LiveKit Docs | lib/src/proto/livekit_rtc.pb.dart | src/room/participant/LocalParticipant.tspolite-oil-10264
09/23/2025, 3:49 PMtall-airline-16756
09/23/2025, 3:50 PMsetTrackSubscriptionPermissions method in your client-side code, right after the local participant has connected to the room and published their tracks. This method is called on the localParticipant instance.
Here’s a quick example in JavaScript to give you an idea:
localParticipant.setTrackSubscriptionPermissions(false, [
{ participantIdentity: 'p1', allTracksAllowed: true },
{ participantIdentity: 'p2', trackSids: ['audio'] }
]);
If you let me know which SDK you’re working with (like JavaScript, Swift, Kotlin, etc.), I’d be happy to share a more tailored example to help you out!
Sources: Camera & microphone | LiveKit Docs | Runtime/Scripts/Proto/Ffi.cs | Runtime/Scripts/Room/Participant/LocalParticipant.cs | Multiplatform/Views/RoomView.swift | packages/livekit-rtc/src/proto/track_pb.tspolite-oil-10264
09/23/2025, 3:53 PMtall-airline-16756
09/23/2025, 3:53 PMSubscriptionPermissionUpdate signal. This then triggers a TrackSubscriptionPermissionChanged event in the client SDK, so you can respond instantly to the new permissions.
For instance, you might want to listen for this event to update the UI dynamically or manage track subscriptions smoothly:
room.on('TrackSubscriptionPermissionChanged', (event) => {
console.log('Subscription permissions updated:', event);
// Update your UI or logic here
});
If you'd like, I’m here to help with more details or examples tailored to your specific SDK—just let me know!
Sources: src/room/participant/LocalParticipant.ts | pkg/rtc/room.go | protobufs/livekit_rtc.proto | lib/src/core/room.dart | livekit-android-sdk/src/main/java/io/livekit/android/events/ParticipantEven...