Skip to main content
setSubscribeToTracksAutomatically(enabled) Toggles automatic track subscription during a call. When enabled, Daily automatically subscribes to audio, video, and screen tracks from all participants. When disabled, no new subscriptions are created automatically — you manage subscriptions manually via updateParticipant(). Must be called while in a call. To start a call without subscribing to any tracks, set subscribeToTracksAutomatically: false at call creation time.
Track subscriptions only apply over SFU connections. In P2P calls, all tracks are always received.

Parameters

enabled
boolean
required
true to subscribe to all tracks automatically, false to manage subscriptions manually.

Return value

Returns this for chaining.

Example

// Stop auto-subscribing, then selectively subscribe to specific participants
call.setSubscribeToTracksAutomatically(false);

call.updateParticipant(participantId, {
  setSubscribedTracks: { audio: true, video: true, screenVideo: false },
});

See also