From c328b767c9be780a7ef826ff8333897b0b266458 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Tue, 26 Nov 2024 20:44:37 +0530 Subject: [PATCH] Do not treat data publisher as publisher. (#3204) --- pkg/rtc/participant.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index a29749cea..24ddd4f2b 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -1842,7 +1842,6 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt shouldForwardData := true shouldForwardMetrics := false overrideSenderIdentity := true - isPublisher := true // only forward on user payloads switch payload := dp.Value.(type) { case *livekit.DataPacket_User: @@ -1887,7 +1886,6 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt } shouldForwardData = false shouldForwardMetrics = true - isPublisher = false // METRICS-TODO-QUESTIONS: // 1. Should this record (and do processing/batching) metrics (i. e. publisher side) rather // than forwarding and recording/processing/batching at every subscriber (in this case @@ -1929,10 +1927,6 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt onMetrics(p, dp) } } - - if isPublisher { - p.setIsPublisher(true) - } } func (p *ParticipantImpl) onICECandidate(c *webrtc.ICECandidate, target livekit.SignalTarget) error {