ignore placeholder data channel

This commit is contained in:
David Zhao
2020-12-19 16:18:58 -08:00
parent f753172308
commit e9fdd5d2fd
+5 -1
View File
@@ -19,6 +19,7 @@ import (
) )
const ( const (
placeholderDataChannel = "_private"
sdBatchSize = 20 sdBatchSize = 20
) )
@@ -366,7 +367,10 @@ func (p *Participant) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *webrt
} }
func (p *Participant) onDataChannel(dc *webrtc.DataChannel) { 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) dt := NewDataTrack(p.id, dc)
p.lock.Lock() p.lock.Lock()