Bug 1437741 - Part 2: Map datachannel to an m-line after all RTP transceivers have been mapped. r=drno

MozReview-Commit-ID: 3hUvFaTYldx

--HG--
extra : rebase_source : 23beaa415109cb809198ae097d2821d9c0c52dc7
This commit is contained in:
Byron Campen [:bwc] 2018-02-15 10:25:03 -06:00
Родитель 83b3a27494
Коммит 6b92557023
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -1419,6 +1419,16 @@ JsepSessionImpl::GetTransceiverForLocal(size_t level)
// There is no transceiver for |level| right now.
// Look for an RTP transceiver
for (RefPtr<JsepTransceiver>& transceiver : mTransceivers) {
if (transceiver->GetMediaType() != SdpMediaSection::kApplication &&
!transceiver->IsStopped() && !transceiver->HasLevel()) {
transceiver->SetLevel(level);
return transceiver.get();
}
}
// Ok, look for a datachannel
for (RefPtr<JsepTransceiver>& transceiver : mTransceivers) {
if (!transceiver->IsStopped() && !transceiver->HasLevel()) {
transceiver->SetLevel(level);