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

Clarify offerToReceiveAudio and offerToReceiveVideo in renegotiation #1361

Closed
fluffy opened this issue Jun 9, 2017 · 9 comments
Closed

Clarify offerToReceiveAudio and offerToReceiveVideo in renegotiation #1361

fluffy opened this issue Jun 9, 2017 · 9 comments

Comments

@fluffy
Copy link
Contributor

fluffy commented Jun 9, 2017

Not clear if setting RTCOfferOptions changes what happens in renegotation or can this only be used in an initial offer.

@stefhak
Copy link
Contributor

stefhak commented Jun 12, 2017

There is indeed no such info. However, it is said that
When this is given a non-false value, no outgoing track of type "audio" is attached to the PeerConnection, and the existing localDescription (if any) doesn't contain any sendrecv or recv audio media sections, createOffer() will behave as if addTransceiver("audio") had been called once prior to the createOffer() call.
which I read as this would happen every time createOffer() is called.
Is this the way it should work in your opinion?

@aboba aboba changed the title Clarify offerToReceiveAudio and offerToReceiveVideo in renogtiation Clarify offerToReceiveAudio and offerToReceiveVideo in renegotiation Jun 13, 2017
@aboba aboba added the question label Jun 13, 2017
@stefhak stefhak self-assigned this Jun 14, 2017
@stefhak
Copy link
Contributor

stefhak commented Jun 22, 2017

Related to #1383

@ekr
Copy link
Contributor

ekr commented Jun 28, 2017

My question is: what existing software depends on the creation of the transceiver at this time as opposed to (say) at setLocal()

@taylor-b
Copy link
Contributor

It's not that software depends on it, it's that JSEP does. JSEP says "here's how you create an offer given a set of transceivers". So without actually adding a transceiver, how can we say "create an offer according to JSEP"? We'd need to say "create an offer according to JSEP, acting as if these extra transceivers exist if offerToReceiveX was true". And we'd need to specify how setLocalDescription creates transceivers.

This PR is just much simpler than any other alternative, and solves most of the backwards compatibility use cases, which is what offerToReceive exists for in the first place. I don't think we should introduce extra complexity just so that the legacy API matches the object model perfectly; the legacy API only exists for practical reasons, so it makes sense to design it according to practical reasons.

@aboba
Copy link
Contributor

aboba commented Jun 28, 2017

createOffer uses knowledge of how many transceivers there are in creating the offer. Sources of that information include addTransceiver as well as transceiver.stop. offerToReceiveAudio/offerToReceiveVideo is another source. So the question here is how many transceivers createOffer should assume if RTCPeerConnection has no unstopped "sendrecv" or "recvonly" audio/video transceivers. Presumably if offerToReceiveAudio is not false then there is a desire to have an audio m-line, and if offerToReceiveVideo is not false there is a desire to have a video m-line.

createOffer could perhaps act as though the transceiver existed without creating it, with creation waiting until later (e.g. when SLD is called). However, that would imply that the developer would need to call createOffer and setLocalDescription before being able to call transceiver-based methods such setParameters, setCodecPreferences`, etc. That seems convoluted.

@stefhak
Copy link
Contributor

stefhak commented Aug 21, 2017

Going back to @fluffy's original comment #1361 (comment): I think the proposed solution (#1430) is pretty clear: offerToReceive* applies also for re-offers.

@fluffy
Copy link
Contributor Author

fluffy commented Aug 21, 2017

I think that JSEP has moved to make an Re-Offer as close as possible to an initial offer and we should do the same here.

@stefhak
Copy link
Contributor

stefhak commented Aug 22, 2017

I think #1430 does precisely that regarding offerToReceive*. The same should be true for voiceActivityDetection. For iceRestart I'm not sure what that would mean in an initial offer.

@stefhak
Copy link
Contributor

stefhak commented Oct 5, 2017

#1430 has been merged, and my reading is that we with that can close this Issue.

@stefhak stefhak closed this as completed Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants