File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -310,12 +310,7 @@ string Description::generateSdp(string_view eol) const {
310
310
311
311
// Session-level attributes
312
312
sdp << " a=msid-semantic:WMS *" << eol;
313
- sdp << " a=setup:" << mRole << eol;
314
313
315
- if (mIceUfrag )
316
- sdp << " a=ice-ufrag:" << *mIceUfrag << eol;
317
- if (mIcePwd )
318
- sdp << " a=ice-pwd:" << *mIcePwd << eol;
319
314
if (!mIceOptions .empty ())
320
315
sdp << " a=ice-options:" << utils::implode (mIceOptions , ' ,' ) << eol;
321
316
if (mFingerprint )
@@ -339,6 +334,14 @@ string Description::generateSdp(string_view eol) const {
339
334
for (const auto &entry : mEntries ) {
340
335
sdp << entry->generateSdp (eol, addr, port);
341
336
337
+ // RFC 8829: Attributes that SDP permits to be at either the session level or the media level
338
+ // SHOULD generally be at the media level even if they are identical.
339
+ sdp << " a=setup:" << mRole << eol;
340
+ if (mIceUfrag )
341
+ sdp << " a=ice-ufrag:" << *mIceUfrag << eol;
342
+ if (mIcePwd )
343
+ sdp << " a=ice-pwd:" << *mIcePwd << eol;
344
+
342
345
if (!entry->isRemoved () && std::exchange (first, false )) {
343
346
// Candidates
344
347
for (const auto &candidate : mCandidates )
You can’t perform that action at this time.
0 commit comments