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

Confusing wording around return value of RTCPeerConnection.createOffer #33453

Closed
srujzs opened this issue May 6, 2024 · 2 comments · Fixed by #34051
Closed

Confusing wording around return value of RTCPeerConnection.createOffer #33453

srujzs opened this issue May 6, 2024 · 2 comments · Fixed by #34051
Labels
area: WebRTC Needs help from someone with WebRTC domain knowledge Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@srujzs
Copy link

srujzs commented May 6, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer

What specific section or headline is this issue about?

Return value

What information was incorrect, unhelpful, or incomplete?

In the main section, the return value is described as:

The return value is a Promise which, when the offer has been created, is resolved with a RTCSessionDescription object containing the newly-created offer.

But then in the "Return value" section, it states:

A Promise whose fulfillment handler will receive an object conforming to the RTCSessionDescriptionInit dictionary which contains the SDP describing the generated offer. That received offer should be delivered through the signaling server to a remote peer.

which seems incompatible, or at the very least, confusing.

What did you expect to see?

The sections describing the return value should be the same.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@srujzs srujzs added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 6, 2024
@github-actions github-actions bot added Content:JS JavaScript docs Content:WebAPI Web API docs labels May 6, 2024
@Josh-Cena Josh-Cena removed the Content:JS JavaScript docs label May 7, 2024
@Josh-Cena
Copy link
Member

Do you mean that RTCSessionDescriptionInit and RTCSessionDescription are incompatible? The correct one should be RTCSessionDescriptionInit per spec. Technically, the two objects have the same properties so it shouldn't be too jarring_, but it's not an RTCSessionDescription instance.

@Josh-Cena Josh-Cena added needs info Needs more information to review or act on. area: WebRTC Needs help from someone with WebRTC domain knowledge and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 10, 2024
@srujzs
Copy link
Author

srujzs commented Jun 10, 2024

RTCSessionDescription seems to have an extra toJSON method which RTCSessionDescriptionInit does not. For the most part, they're similar enough, but having inconsistent wording is a little bit confusing.

@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs info Needs more information to review or act on. labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: WebRTC Needs help from someone with WebRTC domain knowledge Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants