-
Notifications
You must be signed in to change notification settings - Fork 114
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
Let createOffer and createAnswer resolve with RTCSessionDescription instead of RTCSessionDescriptionInit #922
Comments
Wouldn't this imply that .type is readonly which would disallow changing the type of answer to pranswer? |
@foolip This would appear to make the problem you mention in #573 (comment) more common. |
OK, so there's a use case for modifying the return value. (I know little about the semantics and am just noticing differences between spec and implementations, so pardon if this was obvious.) The way it's implemented in Blink is to create a new RTCSessionDescription instance, and because its attributes are mutable it would work. But to change RTCSessionDescription to be immutable without without also changing RTCSessionDescription to RTCSessionDescriptionInit in these contexts would be risky. So, I conclude that if the RTCSessionDescription changes turn out not be web compatible and need to be reverted, then that would be the time to change this as well. Does that sound about right? If so, this can be closed for now, and be revisited if #573 doesn't work out. |
PR-Answer is being discussed in RTCWEB. That discussion may converge in Korea. |
Is this solved by #949? |
This issue basically observes that implementations are behind the spec, which I'm about to fix. @foolip said this could be closed, and I agree. #949 was about the legacy callbacks. |
OK, closing. |
…criptionInit see https://w3c.github.io/webrtc-pc/#interface-definition and related discussion in w3c/webrtc-pc#922 BUG=chromium:662898 Change-Id: Ife82799e468db582cf28273a9293ddd6c70fbb6f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2747379 Reviewed-by: Henrik Boström <hbos@chromium.org> Reviewed-by: Harald Alvestrand <hta@chromium.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#863460}
I have a question related to this which was introduced in #574 after Chrome was just updated to "follow the spec" which broke because toJSON can no longer be called.
I'll note that returning RTCSessionDescription has not been a problem for anyone for the last eight years despite Firefox and Safari not doing so. Most web developers who have been around for a while stopped trusting toJSON after this issue |
No need. It was a workaround. You now have the object toJSON() would have returned #2969.
It is consistent with apps' desire to mutate the offer or answer returned while
What are they doing then? |
Thank you, this is starting to make sense! We still should have better tests than "createAnswer works", i'll take that. |
https://w3c.github.io/webrtc-pc/#interface-definition
Both Blink and Gecko use RTCSessionDescription here, at least in the IDL:
https://github.com/mozilla/gecko-dev/blob/d3b37a02baa51459a8745ef9449c234cd26f8d1c/dom/webidl/RTCPeerConnection.webidl#L99
https://chromium.googlesource.com/chromium/src/+/b3ccf01a59d182eee56040de8624d4b1b01abe73/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl#71
@jan-ivar
The text was updated successfully, but these errors were encountered: