-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Broken link to RTCSessionDescriptionInit, RTCLocalSessionDescriptionInit #33962
Labels
Comments
bc-lee
added
the
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
label
Jun 6, 2024
bc-lee
added a commit
to bc-lee/mdn-content
that referenced
this issue
Jun 6, 2024
…lSessionDescriptionInit Add missing documentation for RTCSessionDescriptionInit, RTCLocalSessionDescriptionInit interfaces. Also correct several links referencing those interfaces. Also add a clear explanation of the relationship between RTCSessionDescription, RTCSessionDescriptionInit, and RTCLocalSessionDescriptionInit interfaces. Fixes mdn#33962
Josh-Cena
added
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 7, 2024
Josh-Cena
changed the title
Missing page for RTCSessionDescriptionInit in RTCPeerConnection.createAnswer documentation
Broken link to RTCSessionDescriptionInit, RTCLocalSessionDescriptionInit
Jun 7, 2024
fiji-flo
pushed a commit
that referenced
this issue
Oct 2, 2024
* fix: Add missing documentation for RTCSessionDescriptionInit, RTCLocalSessionDescriptionInit Add missing documentation for RTCSessionDescriptionInit, RTCLocalSessionDescriptionInit interfaces. Also correct several links referencing those interfaces. Also add a clear explanation of the relationship between RTCSessionDescription, RTCSessionDescriptionInit, and RTCLocalSessionDescriptionInit interfaces. Fixes #33962 * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply Code Review Combine RTCSessionDescriptionInit and RTCLocalSessionDescriptionInit descriptions within the RTCSessionDescription page. Additionally, update any related links. * Update files/en-us/web/api/rtcsessiondescription/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/api/rtcsessiondescription/rtcsessiondescription/index.md * Update * Update files/en-us/web/api/rtcpeerconnection/setlocaldescription/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix * Fix others --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Joshua Chen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
The page for
RTCPeerConnection.createAnswer
has a broken link toRTCSessionDescriptionInit
because there is no separate page for itActually there is a bigger issue here. MDN needs to clarify the relationship between
RTCSessionDescription
,RTCSessionDescriptionInit
, andRTCLocalSessionDescriptionInit
.What did you expect to see?
A page for
RTCSessionDescriptionInit
, also a separate page forRTCLocalSessionDescriptionInit
would be nice. Also clarify the relationship betweenRTCSessionDescription
,RTCSessionDescriptionInit
, andRTCLocalSessionDescriptionInit
.Do you have any supporting links, references, or citations?
https://w3c.github.io/webrtc-pc
Do you have anything more you want to share?
Here is my understanding of this issue (since this is long, I will use a collapsible section):
Details
Relevant WebIDL definitions for RTCSessionDescription, RTCSessionDescriptionInit, and RTCLocalSessionDescriptionInit (from https://w3c.github.io/webrtc-pc):
Understanding RTCSessionDescription:
type
: Specifies the SDP type (e.g., "offer", "answer", "pranswer", or "rollback").sdp
: Contains the actual SDP string, which is meaningless for the "rollback" type.RTCSessionDescriptionInit and RTCLocalSessionDescriptionInit
These names closely resemble RTCSessionDescription, but they serve a different purpose. Here's a breakdown:
RTCPeerConnection.setLocalDescription()
andRTCPeerConnection.setRemoteDescription()
methods, allowing you to set session descriptions without creating a full-fledged RTCSessionDescription object.RTCSessionDescriptionInit
is also the return type forRTCPeerConnection.createOffer()
andRTCPeerConnection.createAnswer()
, which generate SDP strings. These generated SDPs are typically used for either setting a local description or sending them to a remote peer.Why Separate Interfaces?
The separation between
RTCSessionDescriptionInit
andRTCLocalSessionDescriptionInit
might seem unnecessary and confusing at first. Here's the reasoning:RTCPeerConnection.setLocalDescription()
always required both an SDP string and a type.RTCPeerConnection.createOffer()
andRTCPeerConnection.setLocalDescription()
. They can simply use the parameterless version ofsetLocalDescription()
.RTCLocalSessionDescriptionInit
was introduced. UnlikeRTCSessionDescriptionInit
, it doesn't even require atype
property. In WebIDL, if you callRTCPeerConnection.setLocalDescription()
without any arguments, it's equivalent to callingRTCPeerConnection.setLocalDescription({})
. This can be seen as a way to enhance WebIDL's flexibility.In Summary:
createOffer()
andcreateAnswer()
.type
property.MDN metadata
Page report details
en-us/web/api/rtcsessiondescription
The text was updated successfully, but these errors were encountered: