ignore placeholder data channel
@@ -19,6 +19,7 @@ import (
)
const (
+ placeholderDataChannel = "_private"
sdBatchSize = 20
)
@@ -366,7 +367,10 @@ func (p *Participant) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *webrt
}
func (p *Participant) onDataChannel(dc *webrtc.DataChannel) {
- logger.GetLogger().Debugw("dataChannel added", "participantId", p.ID(), "id", dc.ID())
+ if dc.Label() == placeholderDataChannel {
+ return
+ }
+ logger.GetLogger().Debugw("dataChannel added", "participantId", p.ID(), "label", dc.Label())
dt := NewDataTrack(p.id, dc)
p.lock.Lock()
