-
Notifications
You must be signed in to change notification settings - Fork 112
Description
Summary
Looking for a way to learn which remote participants are currently subscribed to a local track from the Python SDK. I didn't find an event or API that exposes the subscriber list, so I can't automatically tear down unwatched streams.
Steps to Reproduce
- Publish a local video or audio track from a Python client .
- Have another participant subscribe to the track.
- Observe that
local_track_subscribeddoesn't tell us who subscribed to our local track.
Repo for reproduction: https://github.com/jon-mcmillan/livekit-subscription-events
Observed Behavior
I couldn't find any SDK call that returns the current subscriber list, which means I'd have to track subscriptions via events. However,
track_subscribedhas the remote participant info, but it fires on the subscriber side, not the publisher side.local_track_subscribedfires on the publisher side, but there's no remote participant argument.
Expected Behavior
Either an event or an API surface that lets me query the current subscribers for each local track so I can shut down streams when nobody is watching.
Use Case
Our publishers are robots streaming video; they need to conserve bandwidth, data, and compute by shutting off unused tracks as soon as there are no subscribers.
Version
livekit-api==1.0.5
livekit==1.0.13
Is there an existing way to retrieve current subscribers for a local track, or would this require a new API/event?