File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1856,7 +1856,9 @@ func (pc *PeerConnection) generateUnmatchedSDP(useIdentity bool) (*sdp.SessionDe
18561856 if len (audio ) > 0 {
18571857 mediaSections = append (mediaSections , mediaSection {id : "audio" , transceivers : audio })
18581858 }
1859- mediaSections = append (mediaSections , mediaSection {id : "data" , data : true })
1859+ for i := uint32 (0 ); i < pc .sctpTransport .dataChannelsRequested ; i ++ {
1860+ mediaSections = append (mediaSections , mediaSection {id : pc .sctpTransport .dataChannels [i ].label , data : true })
1861+ }
18601862 } else {
18611863 for _ , t := range pc .GetTransceivers () {
18621864 if t .Sender () != nil {
@@ -1865,7 +1867,9 @@ func (pc *PeerConnection) generateUnmatchedSDP(useIdentity bool) (*sdp.SessionDe
18651867 mediaSections = append (mediaSections , mediaSection {id : t .Mid (), transceivers : []* RTPTransceiver {t }})
18661868 }
18671869
1868- mediaSections = append (mediaSections , mediaSection {id : strconv .Itoa (len (mediaSections )), data : true })
1870+ for i := uint32 (0 ); i < pc .sctpTransport .dataChannelsRequested ; i ++ {
1871+ mediaSections = append (mediaSections , mediaSection {id : strconv .Itoa (len (mediaSections )), data : true })
1872+ }
18691873 }
18701874
18711875 dtlsFingerprints , err := pc .configuration .Certificates [0 ].GetFingerprints ()
You can’t perform that action at this time.
0 commit comments