Subject: Re: [rtcweb] Processing multiple remote offers

From: "Cullen Jennings (fluffy)" <[email-masked]>
Date: Mon, 5 Mar 2018 22:57:53 +0000

On Oct 17, 2017, at 8:50 AM, Harald Alvestrand <[email-masked]<mailto:[email-masked]>> wrote:

Den 17. okt. 2017 01:12, skrev Taylor Brandstetter:
JSEP allows a remote offer to be applied while in the
"have-remote-offer" state. Meaning that, in addition to supporting
multiple answers (via pr-answers), JSEP also supports multiple offers.

However, I don't see any text that calls out what (if anything) must be
the same between these offers. Should we assume that they can be
/completely/ different? Or do they at least need to contain the same m=
sections (same type, MID and order)? For example: is it legal to apply
an audio-only remote offer, then apply a video-only remote offer? Is it
legal to apply an audio-only offer, then an audio+video offer?

They can be totally different but only the last one applies will have any impact on the media stack.

So say browser A sends and offer with audio and video to endpoint B and C and they both return totally different pr-answers. B only accepts audio and C only does video.

If the JS at A apples the one B, the browser sends audio to B. If the JS then applies the one from C, the browse with stop whatever it was doing to B and start sending video to C. At that point the JS could decide to go back to the one from B and the browser could go back to sending audio to B. Eventually if final offer came from B and the JS at A applied it, the browser could fee up the video codec because at this point it knows it will not be needed.