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

offerToReceive: Rewrite to handle two options to createOffer #1686

Merged
merged 4 commits into from
Dec 7, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 50 additions & 48 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3273,70 +3273,72 @@ <h2>Callback <a class="idlType">RTCSessionDescriptionCallback</a>
</section>
<section>
<h4>Legacy configuration extensions</h4>
<div>
<pre class="idl">partial dictionary RTCOfferOptions {
boolean offerToReceiveAudio;
boolean offerToReceiveVideo;
};
</pre>
<section>
<h2>Attributes</h2>
<dl data-link-for="RTCOfferOptions" data-dfn-for="RTCOfferOptions" class="dictionary-members">
<dt><dfn>offerToReceiveAudio</dfn> of type <span class="idlMemberType"><a>boolean</a></span></dt>
<dd>
<p>Offer to receive audio even though no audio will be sent.
When this dictionary member is present as an option to <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a>, run the
<a>offer to receive</a> steps with a <var>mediaType</var> of
"audio" instead of the regular <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a> steps.</p>
</dd>
<dt><dfn>offerToReceiveVideo</dfn> of type <span class="idlMemberType"><a>boolean</a></span></dt>
<dd>
<p>Offer to receive video even though no video will be sent.
When this dictionary member is present as an option to <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a>, run the
<a>offer to receive</a> steps with a <var>mediaType</var> of
"video" instead of the regular <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a> steps.</p>
</dd>
</dl>
<p>To <dfn>offer to receive</dfn> with <var>mediaType</var>, run
the following steps:</p>
<p>When <a href="#dom-rtcpeerconnection-createoffer">createOffer</a>
is called with any of the legacy options specified in this section,
run the followings steps instead of the regular <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a> steps:</p>
<ol>
<li>
<p>Let <var>options</var> be the methods second argument.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first argument? (I am glad we're dealing with the legacy callbacks elsewhere)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix!

</li>
<li>
<p>Let <var>connection</var> be the current <code>
<a>RTCPeerConnection</a></code> object.</p>
</li>
<li>
<p>For each "offerToReceive&lt;Kind&gt;" member in <var>options</var> with
kind, <var>kind</var>, run the following steps:</p>
<ol>
<li>
<p>Let <var>connection</var> be the current <code>
<a>RTCPeerConnection</a></code> object.</p>
</li>
<li>
<p>If the value of the dictionary member is false, jump to the
step labeled <em>create offer</em>.</p>
<p>If the value of the dictionary member is false, continue
with the next option, if any.</p>
</li>
<li>
<p>If <var>connection</var> has any stopped "sendrecv" or
"recvonly" transceivers of type <var>mediaType</var>, jump to
the step labeled <em>create offer</em>.</p>
<p>If <var>connection</var> has any non-stopped "sendrecv"
or "recvonly" transceivers of <a>transceiver kind</a>
<var>kind</var>, continue with the next option, if any.</p>
</li>
<li>
<p>Let <var>transceiver</var> be the result of invoking the
equivalent of <code>connection.addTransceiver(mediaType)</code>,
except that this operation MUST NOT <a>update the
equivalent of
<code>connection.addTransceiver(kind)</code>, except
that this operation MUST NOT <a>update the
negotiation-needed flag</a>.</p>
</li>
<li>
<p>If <var>transceiver</var> is unset because the previous
operation threw an error, abort these steps.</p>
</li>
<li>
<p>Set <var>transceiver</var>'s <a>[[\Direction]]</a> slot to
"recvonly".</p>
</li>
<li>
<p><em>create offer:</em> Run the steps specified by <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a> to create
the offer.</p>
<p>Set <var>transceiver</var>'s <a>[[\Direction]]</a> slot
to "recvonly".</p>
</li>
</ol>
</li>
<li>
<p>Run the steps specified by <a href=
"#dom-rtcpeerconnection-createoffer">createOffer</a> to create
the offer.</p>
</li>
</ol>
<div>
<pre class="idl">partial dictionary RTCOfferOptions {
boolean offerToReceiveAudio;
boolean offerToReceiveVideo;
};
</pre>
<section>
<h2>Attributes</h2>
<dl data-link-for="RTCOfferOptions" data-dfn-for="RTCOfferOptions" class="dictionary-members">
<dt><dfn>offerToReceiveAudio</dfn> of type <span class="idlMemberType"><a>boolean</a></span></dt>
<dd>
<p>TODO</p>
</dd>
<dt><dfn>offerToReceiveVideo</dfn> of type <span class="idlMemberType"><a>boolean</a></span></dt>
<dd>
<p>TODO</p>
</dd>
</dl>
</section>
</div>
</section>
Expand Down