Forward data between WHIP client and non-WHIP client (#3627)

* Forward data between WHIP client and non-WHIP client

* fix test
This commit is contained in:
Raja Subramanian
2025-04-25 23:20:08 +05:30
committed by GitHub
parent 6739e7bcc8
commit e14905581c
8 changed files with 77 additions and 25 deletions
+1 -2
View File
@@ -754,8 +754,7 @@ func (c *RTCClient) PublishDataUnlabeled(data []byte) error {
return err
}
fmt.Printf("RAJA sending unlabeled data: %s\n", string(data)) // REMOVE
return c.publisher.SendDataMessageUnlabeled(data)
return c.publisher.SendDataMessageUnlabeled(data, true)
}
func (c *RTCClient) GetPublishedTrackIDs() []string {
+1 -2
View File
@@ -173,8 +173,7 @@ func scenarioDataUnlabeledPublish(t *testing.T) {
payload := "test unlabeled bytes"
received := atomic.NewBool(false)
c2.OnDataUnlabeledReceived = func(data []byte) {
fmt.Printf("RAJA received data: message: %s, sid: %s\n", string(data), c1.ID()) // REMOVE
c2.OnDataReceived = func(data []byte, _sid string) {
if string(data) == payload {
received.Store(true)
}