Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse closed m= sections in Firefox #149

Open
wants to merge 13 commits into
base: v3
Choose a base branch
from
Open

Conversation

snnz
Copy link

@snnz snnz commented Dec 27, 2020

This PR handles m= sections reuse in Firefox by synchronizing RemoteSdp with the local description regardless of where the new transceiver's section is placed by the browser.

@ibc
Copy link
Member

ibc commented Dec 28, 2020

Thanks. AFAIR there is a reason for me to not do this that way in the past, but I cannot recall which one now. I have to take a deeper look to this. IMHO if this works it must be done for all handlers and not just for Firefox.

if (!this._firstMid)
this._firstMid = newMediaSection.mid;

// Append new section to the existing vector and the SDP object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot after en of comments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

this._mediaSections.push(newMediaSection);
this._sdpObject.media.push(newMediaSection.getObject());

// Add it to the map
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for all the added comments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Periods added to the comments.

// Recreate map
this._midToIndex.clear();
for (idx = 0; idx < this._mediaSections.length; ++idx)
this._midToIndex.set(this._mediaSections[idx].mid, idx);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

braces missing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces added.

@ibc
Copy link
Member

ibc commented Apr 23, 2024

I will come back to this PR next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants