From d90cd0eeb0e3f9727c3e1d54afa7d75d38d81516 Mon Sep 17 00:00:00 2001 From: Amit Hilbuch Date: Tue, 22 Jan 2019 13:44:25 -0800 Subject: [PATCH 1/2] Clarifying how the simulcast envelope is created. Added text to articulate the difference between the offerer who calls addTransceiver to define the simulcast envelope and the answerer who is passive and has the envelope set up for them in a call to setRemoteDescription. Added steps to Set the RTCSessionDescription to indicate how the the envelope should be set up or modified. Fixes: #2014. --- webrtc.html | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/webrtc.html b/webrtc.html index 37b91f75d..7438b3e2d 100644 --- a/webrtc.html +++ b/webrtc.html @@ -1750,9 +1750,19 @@

Set the RTCSessionDescription

(transceiver is unset), run the following steps:

    +
  1. +

    If the description is of type "offer" + and contains a request to receive simulcast, follow the order + of the rid values specified in the simulcast attribute to create + an RTCRtpEncodingParameters dictionary for + each of the simulcast layers, populating the rid member + according to the corresponding rid value, and let sendEncodings + be the list containing the created dictionaries. + Otherwise, let sendEncodings be an empty list.

    +
  2. Create an RTCRtpSender, sender, - from the media description.

    + from the media description using sendEncodings.

  3. Create an RTCRtpReceiver, @@ -1767,6 +1777,38 @@

    Set the RTCSessionDescription

+
  • +

    If description is of type "answer" + or "pranswer", and transceiver. + [[\Sender]].[[\sendEncodings]] .length is + greater than 1, then run the following steps:

    +
      +
    1. +

      If description indicates that simulcast is + not supported or desired, then set the + active + member to false on all dictionaries in + transceiver.[[\Sender]].[[\sendEncodings]] + except the first one and abort these sub steps.

      +
    2. +
    3. +

      If description rejects any of the offered layers, + then set the + active + member to false on the dictionaries in + transceiver.[[\Sender]].[[\sendEncodings]] + that correspond to rejected layers.

      +
    4. +
    5. +

      Update the paused status as indicated by [[MMUSIC-SIMULCAST]] of + each simulcast layer by setting the + active + member on the corresponding dictionaries in + transceiver.[[\Sender]].[[\sendEncodings]] + to true for unpaused or to false for paused.

      +
    6. +
    +
  • Set transceiver's mid value to the mid of @@ -7604,6 +7646,12 @@

    Simulcast functionality

    implications of this model is that the addTrack method cannot provide simulcast functionality since it does not take sendEncodings as an argument, and therefore cannot configure an RTCRtpTransceiver to send simulcast.

    +

    Another implication is that the answerer cannot set the simulcast envelope directly. + Upon calling the setRemoteDescription method of the RTCPeerConnection + object, the simulcast envelope is configured on the RTCRtpTransceiver + to contain the layers described by the specified RTCSessionDescription. + Once the envelope is determined, layers cannot be removed. They can be marked as inactive by setting + the active attribute to false effectively disabling the layer.

    While setParameters cannot modify the simulcast envelope, it is still possible to control the number of streams that are sent and the characteristics of those streams. Using setParameters, simulcast streams can be made inactive by setting the active From 8d7631499fe8a81b44475227c4496a870e91c945 Mon Sep 17 00:00:00 2001 From: Amit Hilbuch Date: Thu, 7 Feb 2019 12:53:35 -0800 Subject: [PATCH 2/2] Changing the specified behavior when simulcast or layers are rejected. The algorithm now specifies that layers should be removed, when a layers are rejected or simulcast is not supported. --- webrtc.html | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/webrtc.html b/webrtc.html index 7438b3e2d..ad36af7b4 100644 --- a/webrtc.html +++ b/webrtc.html @@ -1785,19 +1785,14 @@

    Set the RTCSessionDescription

    1. If description indicates that simulcast is - not supported or desired, then set the - active - member to false on all dictionaries in + not supported or desired, then remove all dictionaries in transceiver.[[\Sender]].[[\sendEncodings]] except the first one and abort these sub steps.

    2. If description rejects any of the offered layers, - then set the - active - member to false on the dictionaries in - transceiver.[[\Sender]].[[\sendEncodings]] - that correspond to rejected layers.

      + then remove the dictionaries that correspond to rejected layers from + transceiver.[[\Sender]].[[\sendEncodings]].

    3. Update the paused status as indicated by [[MMUSIC-SIMULCAST]] of