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

Clarifying how the simulcast envelope is created. #2081

Merged
merged 2 commits into from
Feb 14, 2019
Merged
Changes from all 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
45 changes: 44 additions & 1 deletion webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1750,9 +1750,19 @@ <h4>Set the RTCSessionDescription</h4>
(<var>transceiver</var> is unset), run the following
steps:</p>
<ol>
<li>
<p>If the <var>description</var> is of type <code>"offer"</code>
and contains a request to receive simulcast, follow the order
of the rid values specified in the simulcast attribute to create
an <code><a>RTCRtpEncodingParameters</a></code> dictionary for
each of the simulcast layers, populating the <a>rid</a> member
according to the corresponding rid value, and let <var>sendEncodings</var>
be the list containing the created dictionaries.
Otherwise, let <var>sendEncodings</var> be an empty list.</p>
</li>
<li>
<p><a>Create an RTCRtpSender</a>, <var>sender</var>,
from the <a>media description</a>.</p>
from the <a>media description</a> using <var>sendEncodings</var>.</p>
</li>
<li>
<p><a>Create an RTCRtpReceiver</a>,
Expand All @@ -1767,6 +1777,33 @@ <h4>Set the RTCSessionDescription</h4>
</li>
</ol>
</li>
<li>
<p>If <var>description</var> is of type <code>"answer"</code>
or <code>"pranswer"</code>, and <var>transceiver</var>.
<a>[[\Sender]]</a>.<a>[[\sendEncodings]]</a> .length is
greater than <code>1</code>, then run the following steps:</p>
<ol>
<li>
<p>If <var>description</var> indicates that simulcast is
not supported or desired, then remove all dictionaries in
<var>transceiver</var>.<a>[[\Sender]]</a>.<a>[[\sendEncodings]]</a>
except the first one and abort these sub steps.</p>
</li>
<li>
<p>If <var>description</var> rejects any of the offered layers,
then remove the dictionaries that correspond to rejected layers from
<var>transceiver</var>.<a>[[\Sender]]</a>.<a>[[\sendEncodings]]</a>.</p>
</li>
<li>
<p>Update the paused status as indicated by [[MMUSIC-SIMULCAST]] of
each simulcast layer by setting the
<code><a data-link-for="RTCRtpEncodingParameters">active</a></code>
member on the corresponding dictionaries in
<var>transceiver</var>.<a>[[\Sender]]</a>.<a>[[\sendEncodings]]</a>
to <code>true</code> for unpaused or to <code>false</code> for paused.</p>
</li>
</ol>
</li>
<li>
<p>Set <var>transceiver</var>'s <code><a data-link-for=
"RTCRtpTransceiver">mid</a></code> value to the mid of
Expand Down Expand Up @@ -7604,6 +7641,12 @@ <h3>Simulcast functionality</h3>
implications of this model is that the <code>addTrack</code> method cannot provide simulcast
functionality since it does not take <code>sendEncodings</code> as an argument, and therefore cannot
configure an <code><a>RTCRtpTransceiver</a></code> to send simulcast.</p>
<p>Another implication is that the answerer cannot set the <a>simulcast envelope</a> directly.
Upon calling the <code>setRemoteDescription</code> method of the <code><a>RTCPeerConnection</a></code>
object, the <a>simulcast envelope</a> is configured on the <code><a>RTCRtpTransceiver</a></code>
to contain the layers described by the specified <code><a>RTCSessionDescription</a></code>.
Once the envelope is determined, layers cannot be removed. They can be marked as inactive by setting
the <code>active</code> attribute to <code>false</code> effectively disabling the layer.</p>
<p>While <code>setParameters</code> cannot modify the <a>simulcast envelope</a>, it is still possible
to control the number of streams that are sent and the characteristics of those streams. Using
<code>setParameters</code>, simulcast streams can be made inactive by setting the <code>active</code>
Expand Down