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
update MID to be random values when not received in offer #535
Changes from all commits
2d68b45
d0bbe42
76d7fab
d137c43
e33ea0c
565fa1f
4fa52fa
a9e1fb7
9fa7da3
b5ba57e
59f0dfb
58a227b
93c3348
8f53855
11bb175
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2271,10 +2271,10 @@ <h4>RTCSdpType</h4> | |
previous stable state could be null if there has | ||
not yet been a successful offer-answer negotiation.</p> | ||
|
||
<p>If the <code><a href="dom-rtptransceiver-mid">mid</a></code> | ||
<p>If the <code><a href="#dom-rtptransceiver-mid">mid</a></code> | ||
value of an <code><a>RTCRtpTransceiver</a></code> was set to a | ||
non-null value by an <code><a>RTCSessionDescription</a></code> that | ||
is rolled back, the <code><a href="dom-rtptransceiver-mid">mid</a> | ||
is rolled back, the <code><a href="#dom-rtptransceiver-mid">mid</a> | ||
</code> value will be set back to null, as defined by <span | ||
data-jsep="rollback">[[!JSEP]]</span>.</p> | ||
</dd> | ||
|
@@ -2389,17 +2389,17 @@ <h4>RTCIceCandidate Interface</h4> | |
takes a dictionary argument, <var>candidateInitDict</var>, whose content is used | ||
to initialize the new | ||
<a class="idlType" href="#idl-def-RTCIceCandidate"><code>RTCIceCandidate</code></a> | ||
object. If either <var>sdpMid</var> or <var>sdpMLineIndex</var> is not present in | ||
object. If the <var>sdpMLineIndex</var> is not present in | ||
<var>candidateInitDict</var>, the corresponding attribute will be initialized to | ||
<code>null</code>. If neither is present, a <code>TypeError</code> exception | ||
<code>null</code>. If <var>sdpMid</var> is not present, a <code>TypeError</code> exception | ||
will be thrown.</dd> | ||
|
||
<dt>readonly attribute DOMString candidate</dt> | ||
|
||
<dd>This carries the <code>candidate-attribute</code> as defined in | ||
section 15.1 of [[!ICE]].</dd> | ||
|
||
<dt>readonly attribute DOMString? sdpMid</dt> | ||
<dt>readonly attribute DOMString sdpMid</dt> | ||
|
||
<dd>If not <code>null</code>, this contains the identifier of the "media stream | ||
identification" as defined in [[!RFC5888]] for the media component this | ||
|
@@ -3065,7 +3065,7 @@ <h3>RTCPeerConnection Interface Extensions</h3> | |
|
||
<p>The initial value of an <code> | ||
<a>RTCRtpTransceiver</a></code>'s <code><a href= | ||
"dom-rtptransceiver-mid">mid</a></code> attribute is null. | ||
"#dom-rtptransceiver-mid">mid</a></code> attribute is null. | ||
Setting a new <code><a>RTCSessionDescription</a></code> may | ||
change it to a non-null value, as defined in <span data-jsep= | ||
"processing-a-local-desc processing-a-remote-desc">[[!JSEP]]</span>. | ||
|
@@ -3162,7 +3162,7 @@ <h3>RTCPeerConnection Interface Extensions</h3> | |
</p>. | ||
|
||
<p>The initial value of <code><a href= | ||
"dom-rtptransceiver-mid">mid</a></code> is null. Setting a new | ||
"#dom-rtptransceiver-mid">mid</a></code> is null. Setting a new | ||
<code><a>RTCSessionDescription</a></code> may change it to a | ||
non-null value, as defined in <span data-jsep= | ||
"processing-a-local-desc processing-a-remote-desc">[[!JSEP]]</span>. | ||
|
@@ -4125,13 +4125,20 @@ <h3>RTCRtpTransceiver Interface</h3> | |
<dt>readonly attribute DOMString? mid</dt> | ||
|
||
<dd> | ||
<p>The <dfn id= | ||
"dom-rtptransceiver-mid"><code>mid</code></dfn> | ||
<p>The <dfn id="dom-rtptransceiver-mid"><code>mid</code></dfn> | ||
attribute is the <code>mid</code> negotatiated and present | ||
in the local and remote descriptions as defined in | ||
<span data-jsep="initial-offers initial-answers">[[!JSEP]]</span>. Before negotiation is complete, | ||
the <code>mid</code> value may be null. After rollbacks, | ||
the value may change from a non-null value to null.</p> | ||
<span>[[!JSEP]]</span>. | ||
<!-- | ||
TODO add data-jsep="initial-offers initial-answers" to the span | ||
--> | ||
Before negotiation is complete, the <code>mid</code> value may be | ||
null. If there is no MID value in the the remote SDP, and no MID | ||
value was previously assigned, a random value will be created for | ||
the <code>mid</code> as described in <span | ||
data-jsep="ice-candidate-format">[[!JSEP]]</span> when the remote | ||
SDP is set. After rollbacks, the value may change from a non-null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to integrate the generation of mid into the 'set an RTCSessionDescription' algorithm since it would define when it time it should be done in relation to all the state updating and event dispatching. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't think it is really generated it then - its more when the ICE stuff happens There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should figure out when and document it. |
||
value to null.</p> | ||
</dd> | ||
|
||
<dt>[SameObject] readonly attribute RTCRtpSender sender</dt> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It it safe to require sdpMid here? We accept remote descriptions without mid and generate one in that case.
This behaviour (throw if not present) can also be expressed with the "required" WebIDL keyword on the member. And should we keep sdpMLineIndex if we require sdpMid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can require it here because it should not be retuned if it was not in remote description as that would cause something to fetched it to think the remote side supported mid when it does not.
We have to keep the mLineIndiex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing a TypeError if a member is not present, as the prose says, is the same behaviour as requiring it. We can also have a default value on the sdpMLineIndex member to have it initialized to null if not present.