Add participant option for data track auto-subscribe. (#4240)
* Add participant option for data track auto-subscribe. Default disabled. * protocol update to use data track auto subscribe setting * deps
This commit is contained in:
@@ -518,6 +518,9 @@ func (r *RoomManager) StartSession(
|
||||
opts := rtc.ParticipantOptions{
|
||||
AutoSubscribe: pi.AutoSubscribe,
|
||||
}
|
||||
if pi.AutoSubscribeDataTrack != nil {
|
||||
opts.AutoSubscribeDataTrack = *pi.AutoSubscribeDataTrack
|
||||
}
|
||||
iceServers := r.iceServersForParticipant(apiKey, participant, iceConfig.PreferenceSubscriber == livekit.ICECandidateType_ICT_TLS)
|
||||
if err = room.Join(participant, requestSource, &opts, iceServers); err != nil {
|
||||
pLogger.Errorw("could not join room", err)
|
||||
|
||||
Reference in New Issue
Block a user