is there a way to publish an audio track only to a...
# ask-ai
a
is there a way to publish an audio track only to a particular particpant in the room?
t
Thanks for reaching out, 한승준. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — good question about publishing an audio track to only one participant. Short answer: LiveKit does not support publishing a track as a one-to-one/unicast directly (a published track is available to the room). What you can do instead: • Use subscription controls to simulate one-to-one delivery: ◦ Connect participants with
autoSubscribe
disabled so they don't automatically receive published tracks. ◦ Then programmatically subscribe only the intended participant to the publisher's audio track (server-side
updateSubscriptions
or client-side
setSubscribed(true)
for that participant). • You can also set track subscription permissions on the publisher so only allowed participants can subscribe. If you'd like, tell me: • whether you prefer a server-side or client-side approach, and • which SDK (JS, Android, iOS, or server SDK) you’re using, and I’ll provide the exact code snippet for implementing the selective subscription. Sources: Subscribing to tracks | LiveKit docs | Camera & microphone | LiveKit docs