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
+3 -3
View File
@@ -1036,8 +1036,8 @@ func TestSinglePublisherDataTrack(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
c1 := createRTCClient("c1", defaultServerPort, testRTCServicePath, nil)
c2 := createRTCClient("c2", defaultServerPort, testRTCServicePath, nil)
c1 := createRTCClient("c1", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
c2 := createRTCClient("c2", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
waitUntilConnected(t, c1, c2)
// publish a couple of data tracks and ensure clients receive it ok
@@ -1061,7 +1061,7 @@ func TestSinglePublisherDataTrack(t *testing.T) {
})
// a new client joins and should get the initial stream
c3 := createRTCClient("c3", defaultServerPort, testRTCServicePath, nil)
c3 := createRTCClient("c3", defaultServerPort, testRTCServicePath, &testclient.Options{AutoSubscribeDataTrack: true})
// ensure that new client that has joined also received data tracks
waitUntilConnected(t, c3)