|
@@ -245,35 +245,24 @@ export default class LocalSdpMunger {
|
245
|
245
|
return;
|
246
|
246
|
}
|
247
|
247
|
|
248
|
|
- // If the msid attribute is missing, then remove the ssrc from the transformed description so that a
|
249
|
|
- // source-remove is signaled to Jicofo. This happens when the direction of the transceiver (or m-line)
|
250
|
|
- // is set to 'inactive' or 'recvonly' on Firefox, Chrome (unified) and Safari.
|
251
|
|
- const mediaDirection = mediaSection.mLine?.direction;
|
252
|
|
-
|
253
|
|
- if (mediaDirection === MediaDirection.RECVONLY || mediaDirection === MediaDirection.INACTIVE) {
|
254
|
|
- mediaSection.ssrcs = undefined;
|
255
|
|
- mediaSection.ssrcGroups = undefined;
|
256
|
|
-
|
257
|
248
|
// Add the msid attribute if it is missing when the direction is sendrecv/sendonly. Firefox doesn't produce a
|
258
|
249
|
// a=ssrc line with msid attribute for p2p connection.
|
259
|
|
- } else {
|
260
|
|
- const msidLine = mediaSection.mLine?.msid;
|
261
|
|
- const trackId = msidLine && msidLine.split(' ')[1];
|
262
|
|
- const sources = [ ...new Set(mediaSection.mLine?.ssrcs?.map(s => s.id)) ];
|
263
|
|
-
|
264
|
|
- for (const source of sources) {
|
265
|
|
- const msidExists = mediaSection.ssrcs
|
266
|
|
- .find(ssrc => ssrc.id === source && ssrc.attribute === 'msid');
|
267
|
|
-
|
268
|
|
- if (!msidExists && trackId) {
|
269
|
|
- const generatedMsid = this._generateMsidAttribute(mediaType, trackId);
|
270
|
|
-
|
271
|
|
- mediaSection.ssrcs.push({
|
272
|
|
- id: source,
|
273
|
|
- attribute: 'msid',
|
274
|
|
- value: generatedMsid
|
275
|
|
- });
|
276
|
|
- }
|
|
250
|
+ const msidLine = mediaSection.mLine?.msid;
|
|
251
|
+ const trackId = msidLine && msidLine.split(' ')[1];
|
|
252
|
+ const sources = [ ...new Set(mediaSection.mLine?.ssrcs?.map(s => s.id)) ];
|
|
253
|
+
|
|
254
|
+ for (const source of sources) {
|
|
255
|
+ const msidExists = mediaSection.ssrcs
|
|
256
|
+ .find(ssrc => ssrc.id === source && ssrc.attribute === 'msid');
|
|
257
|
+
|
|
258
|
+ if (!msidExists && trackId) {
|
|
259
|
+ const generatedMsid = this._generateMsidAttribute(mediaType, trackId);
|
|
260
|
+
|
|
261
|
+ mediaSection.ssrcs.push({
|
|
262
|
+ id: source,
|
|
263
|
+ attribute: 'msid',
|
|
264
|
+ value: generatedMsid
|
|
265
|
+ });
|
277
|
266
|
}
|
278
|
267
|
}
|
279
|
268
|
}
|