-
Notifications
You must be signed in to change notification settings - Fork 8
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
Revisit server-sent offers #12
Comments
From the quoted section of RFC8829:
I think the phrasing "at least one" (i.e. not necessarily more than one) supports the overconstrained answer scenario. 😞 Would a smaller, non-SDP response satisfy this use case? e.g. a JSON payload broadly describing tracks and kinds, that the client can then use to create an appropriate offer? |
I could see some implementations choosing to interpret RFC8829 that way, but I think that would be a mistake. In the section I quoted above it seems to me to be saying that every supported media format should be present in the answer, and the order should match what's in the offer, after which additional formats not present in the offer are to be listed.
The fact that currently available media formats MUST be added after the existing formats implies to me that available media formats listed in the offer should also be comprehensively represented. Whether all implementations actually follow the spec here is something worth exploring, but this is what the text says, and I think at least browser implementations should be following it correctly. The exception to these requirements is only if codec preferences have been set for the associated transceiver, but I don't think that should be dependent on the contents of the offer, so clients would have to fail in either case there. Also, for what it's worth, I don't love the idea of adding a JSON payload and another round trip here. That seems like an unnecessary delay in startup time we can probably avoid. |
I agree that compliance is worth exploring here. If the problematic behavior is non-compliant then that makes a stronger case for reconsidering server-sent offers. That said, I get what you're saying, but I don't think it's a necessary interpretation of the spec, or the intended one. The text you quoted applies specifically when adding new formats that weren't in the original offer. The broader implication that you're drawing conflicts with the more generally applicable "In either case… at least one format" phrasing in the following bullet. It does seem compliant for an answer to include only one of the existing available media formats, whether or not codec preferences have been set. If the client were adding formats at the same time then a stronger argument could be made for non-compliance, but that isn't the specific scenario that drew concern. |
Just here to add that I think this 100% needs to be solved, we cannot lose the ability to do whep -> whip - it will open up so many possibilities that weren't available before. |
Here's my two cents about the way I currently do what I'd refer to as WHEP Mode 1: https://gist.github.com/mondain/5bc8bee11af4b291abe154b39879e822 Obviously its simplified and I normally live in SFU/MCU world where we keep WHIP and WHEP; publishers and subscribers separate. I WHIP'd this up real quick as well: https://gist.github.com/mondain/7a3792711c489e97e8cede9e5acbef50 |
Coming back to an issue thats been open for a year and we're still in a position where existing WebRTC media servers can't support WHEP without re-architecting their existing WebRTC solution which wasn't the aim of WHEP. WHEP was meant to be a signalling layer on top of WebRTC and WebRTC didn't define who offers what and where... yes a signalling layer can... but I believe in this case it shouldn't stop the scenario of server sent offers. Ultimately receiving media is a more complicated scenario than sending - the sender knows what is being sent and it agrees that with a server and off you go. With receiving media you have loads of permutations of what is possible; are you receiving media for multiple participants? Are you receiving multiple qualities? The media server knows the state of those things.... the client doesn't (in a very simple example) Regardless of the above... unless WHEP supports server sent offers we are at risk of not having broad compatibility across existing WebRTC media servers. I understand a large reason for wanting client side offers is to be able to handle codec profiles... but theres no reason I can see as to why server side offers need to disappear... Receiving media is complicated - for something thats built on top of existing solutions... we need flexibility. Would removing "WHIP -> WHEP" compatibility as a "wish" (see what I did there) help? I appreciate it was a lofty goal. Maybe thats something that could be looked into separately to this. I would like to see both modes remain - I really don't see the harm in keeping both. Edit: Make the spec allow either mode and make it so you can call an OPTIONS request or something that will tell the client what mode a server supports. Make it so a client can only support one mode if it wants to. Yes you could get into a scenario where a client can't talk to a server, but at least this allows certain clients/products to only have to support their one preferred method. |
Before taking this discussion any farther, the chairs would like to see a concrete proposal submitted as a PR. |
Jonas Birmé, Lorenzo and I will put a PR together on this and get back to you soon |
Picking up from discussion started in a video-dev Slack thread.
I think it's worth giving server-sent offers another consideration and maybe making that the one supported WHEP behavior rather than the other way around.
Discussion so far:
The text was updated successfully, but these errors were encountered: