Bug 1639377 - Do not offer RRID header extension if RTX is disabled; r=drno

Differential Revision: https://phabricator.services.mozilla.com/D76890
This commit is contained in:
Dan Minor 2020-05-26 20:49:29 +00:00
Родитель 03c7506984
Коммит 169cad5736
2 изменённых файлов: 12 добавлений и 8 удалений

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

@ -272,12 +272,13 @@ var sdputils = {
var extmap_id = offer_sdp.match(
"a=extmap:([0-9+])/sendonly urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
);
ok(extmap_id != null, "Offer contains RID RTP header extension");
new_answer_sdp =
new_answer_sdp +
"a=extmap:" +
extmap_id[1] +
"/recvonly urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n";
if (extmap_id != null) {
new_answer_sdp =
new_answer_sdp +
"a=extmap:" +
extmap_id[1] +
"/recvonly urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n";
}
return new_answer_sdp;
},

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

@ -406,8 +406,11 @@ std::vector<SdpExtmapAttributeList::Extmap> JsepSessionImpl::GetRtpExtensions(
// TODO: Would it be worth checking that the direction is sane?
AddVideoRtpExtension(webrtc::RtpExtension::kRtpStreamIdUri,
SdpDirectionAttribute::kSendonly);
AddVideoRtpExtension(webrtc::RtpExtension::kRepairedRtpStreamIdUri,
SdpDirectionAttribute::kSendonly);
if (Preferences::GetBool("media.peerconnection.video.use_rtx", false)) {
AddVideoRtpExtension(webrtc::RtpExtension::kRepairedRtpStreamIdUri,
SdpDirectionAttribute::kSendonly);
}
}
break;
default:;