What does `auto_subscribe` do ? ```await ctx.conn...
# ask-ai
s
What does
auto_subscribe
do ?
Copy code
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
t
Thanks for reaching out, Goktug. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — great question. You’re asking what
auto_subscribe
does when you call:
Copy code
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
Short answer: •
auto_subscribe
controls which remote media tracks the client will automatically subscribe to when joining a room. •
AutoSubscribe.AUDIO_ONLY
tells the client to automatically subscribe only to incoming audio tracks and ignore incoming video tracks. What that means in practice: • The client will receive and start delivering remote audio tracks (useful for speech processing, listening, etc.). • Remote video tracks will not be automatically subscribed to; if you later need video you must subscribe to them manually. • Other possible values: ◦
AutoSubscribe.VIDEO_ONLY
— automatically subscribe only to video tracks. ◦
True
(or default) — automatically subscribe to both audio and video. ◦
False
— do not auto-subscribe to any tracks; you must subscribe manually. If you’d like, tell me whether your use case is speech processing, low-bandwidth clients, or something else — I can recommend the best
auto_subscribe
setting and show how to subscribe to tracks manually if needed. Sources: Job lifecycle | LiveKit Documentation | client-sdk-js | livekit/livekit_composite | DeepWiki