|
@@ -25638,7 +25638,7 @@ module.exports = function arrayEquals(array) {
|
25638
|
25638
|
exports.Interop = require('./interop');
|
25639
|
25639
|
|
25640
|
25640
|
},{"./interop":81}],81:[function(require,module,exports){
|
25641
|
|
-var transform = require('./sdp-transform');
|
|
25641
|
+var transform = require('./transform');
|
25642
|
25642
|
var arrayEquals = require('./array-equals');
|
25643
|
25643
|
|
25644
|
25644
|
function Interop() { }
|
|
@@ -26029,17 +26029,27 @@ Interop.prototype.toPlanA = function(desc) {
|
26029
|
26029
|
});
|
26030
|
26030
|
} else {
|
26031
|
26031
|
|
26032
|
|
- // Add all the m-lines that are in both the cached and the transformed
|
26033
|
|
- // SDP in the order of the cached SDP. We take the intersection because
|
26034
|
|
- // don't want to add m-lines from the cached SDP that have been removed
|
26035
|
|
- // from the transformed SDP.
|
|
26032
|
+ // SDP offer/answer (and the JSEP spec) forbids removing an m-section
|
|
26033
|
+ // under any circumstances. If we are no longer interested in sending a
|
|
26034
|
+ // track, we just remove the msid and ssrc attributes and set it to
|
|
26035
|
+ // either a=recvonly (as the reofferer, we must use recvonly if the
|
|
26036
|
+ // other side was previously sending on the m-section, but we can also
|
|
26037
|
+ // leave the possibility open if it wasn't previously in use), or
|
|
26038
|
+ // a=inacive.
|
|
26039
|
+
|
26036
|
26040
|
if (typeof cached !== 'undefined' &&
|
26037
|
26041
|
typeof cached.media !== 'undefined' &&
|
26038
|
26042
|
Array.isArray(cached.media)) {
|
26039
|
26043
|
cached.media.forEach(function(pm) {
|
|
26044
|
+ mids.push(pm.mid);
|
26040
|
26045
|
if (typeof media[pm.mid] !== 'undefined') {
|
26041
|
|
- mids.push(pm.mid);
|
26042
|
26046
|
session.media.push(media[pm.mid]);
|
|
26047
|
+ } else {
|
|
26048
|
+ delete pm.msid;
|
|
26049
|
+ delete pm.sources;
|
|
26050
|
+ // TODO(gp) delete ssrc-groups
|
|
26051
|
+ pm.direction = 'recvonly';
|
|
26052
|
+ session.media.push(pm);
|
26043
|
26053
|
}
|
26044
|
26054
|
});
|
26045
|
26055
|
}
|
|
@@ -26082,7 +26092,7 @@ Interop.prototype.toPlanA = function(desc) {
|
26082
|
26092
|
//#endregion
|
26083
|
26093
|
};
|
26084
|
26094
|
|
26085
|
|
-},{"./array-equals":79,"./sdp-transform":82}],82:[function(require,module,exports){
|
|
26095
|
+},{"./array-equals":79,"./transform":82}],82:[function(require,module,exports){
|
26086
|
26096
|
var transform = require('sdp-transform');
|
26087
|
26097
|
|
26088
|
26098
|
exports.write = function(session, opts) {
|