Skip to content

Commit

Permalink
Changed order in Firefox SDP so rtpmap definitions are before rtp-fb
Browse files Browse the repository at this point in the history
  • Loading branch information
lodoyun committed Apr 9, 2015
1 parent b3ff534 commit da8174f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions erizo_controller/erizoClient/src/webrtc-stacks/FirefoxStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,24 @@ Erizo.FirefoxStack = function (spec) {
var setLocalDesc = function (sessionDescription) {
sessionDescription.sdp = setMaxBW(sessionDescription.sdp);
sessionDescription.sdp = sessionDescription.sdp.replace(/a=ice-options:google-ice\r\n/g, "");
sessionDescription = changeOrder(sessionDescription);
spec.callback(sessionDescription);
localDesc = sessionDescription;
}

var changeOrder = function(sessionDescription) {
var matches = sessionDescription.sdp.match(/^.*(rtcp-fb).*$/gm);
var lines = "";
for (var i in matches){
if (i == 0) lines += matches[i];
else lines += "\n\r" + matches[i];
}
sessionDescription.sdp = sessionDescription.sdp.replace(/^.*(rtcp-fb).*$/gm, "");
sessionDescription.sdp += lines;
sessionDescription.sdp = sessionDescription.sdp.replace(/^\s*$[\n\r]{2,}/gm, '');
return sessionDescription;
}

var setLocalDescp2p = function (sessionDescription) {
sessionDescription.sdp = setMaxBW(sessionDescription.sdp);
sessionDescription.sdp = sessionDescription.sdp.replace(/a=ice-options:google-ice\r\n/g, "");
Expand Down

0 comments on commit da8174f

Please sign in to comment.