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:
Raja Subramanian
2026-01-14 13:22:43 +05:30
committed by GitHub
parent 07572511ba
commit a35a6ae751
9 changed files with 83 additions and 45 deletions
+4 -4
View File
@@ -209,9 +209,9 @@ func scenarioDataUnlabeledPublish(t *testing.T) {
func scenarioDataTracksPublishingUponJoining(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("scenarioDataTracksPublishingUponJoining/testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
c1 := createRTCClient("dtpuj_1", defaultServerPort, testRTCServicePath, nil)
c2 := createRTCClient("dtpuj_2", secondServerPort, testRTCServicePath, &testclient.Options{AutoSubscribe: true})
c3 := createRTCClient("dtpuj_3", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribe: true})
c1 := createRTCClient("dtpuj_1", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
c2 := createRTCClient("dtpuj_2", secondServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
c3 := createRTCClient("dtpuj_3", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
defer stopClients(c1, c2, c3)
waitUntilConnected(t, c1, c2, c3)
@@ -261,7 +261,7 @@ func scenarioDataTracksPublishingUponJoining(t *testing.T) {
logger.Infow("c2 reconnecting")
// connect to a diff port
c2 = createRTCClient("dtpuj_2", defaultServerPort, testRTCServicePath, nil)
c2 = createRTCClient("dtpuj_2", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
defer c2.Stop()
waitUntilConnected(t, c2)
writers = publishDataTracksForClients(t, c2)