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
1856
1856
if len (audio ) > 0 {
1857
1857
mediaSections = append (mediaSections , mediaSection {id : "audio" , transceivers : audio })
1858
1858
}
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
+ }
1860
1862
} else {
1861
1863
for _ , t := range pc .GetTransceivers () {
1862
1864
if t .Sender () != nil {
@@ -1865,7 +1867,9 @@ func (pc *PeerConnection) generateUnmatchedSDP(useIdentity bool) (*sdp.SessionDe
1865
1867
mediaSections = append (mediaSections , mediaSection {id : t .Mid (), transceivers : []* RTPTransceiver {t }})
1866
1868
}
1867
1869
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
+ }
1869
1873
}
1870
1874
1871
1875
dtlsFingerprints , err := pc .configuration .Certificates [0 ].GetFingerprints ()
You can’t perform that action at this time.
0 commit comments