tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

set-session-description.txt (10196B)


      1 Coverage Report is based on the following editor draft:
      2 https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
      3 
      4 4.3.1.6 Set the RTCSessionSessionDescription
      5 
      6  [Trivial]
      7  1.  Let p be a new promise.
      8 
      9  [Trivial]
     10  2.  In parallel, start the process to apply description as described in [JSEP]
     11      (section 5.5. and section 5.6.).
     12 
     13    [Trivial]
     14    1.  If the process to apply description fails for any reason, then user agent
     15        MUST queue a task that runs the following steps:
     16 
     17      [Untestable]
     18      1.  If connection's [[IsClosed]] slot is true, then abort these steps.
     19 
     20      [Untestable]
     21      2.  If elements of the SDP were modified, then reject p with a newly created
     22          InvalidModificationError and abort these steps.
     23 
     24      [RTCPeerConnection-setLocalDescription-answer]
     25      [RTCPeerConnection-setRemoteDescription-offer]
     26      [RTCPeerConnection-setRemoteDescription-answer]
     27      3.  If the description's type is invalid for the current signaling state of
     28          connection as described in [JSEP] (section 5.5. and section 5.6.), then
     29          reject p with a newly created InvalidStateError and abort these steps.
     30 
     31      [RTCPeerConnection-setRemoteDescription-offer]
     32      4.  If the content of description is not valid SDP syntax, then reject p
     33          with an RTCError (with errorDetail set to "sdp-syntax-error" and the
     34          sdpLineNumber attribute set to the line number in the SDP where the
     35          syntax error was detected) and abort these steps.
     36 
     37      [Untestable]
     38      5.  If the content of description is invalid, then reject p with a newly
     39          created InvalidAccessError and abort these steps.
     40 
     41      [Untestable]
     42      6.  For all other errors, for example if description cannot be applied at
     43          the media layer, reject p with a newly created OperationError.
     44 
     45    [Trivial]
     46    2.  If description is applied successfully, the user agent MUST queue a task
     47        that runs the following steps:
     48 
     49      [Untestable]
     50      1.  If connection's [[isClosed]] slot is true, then abort these steps.
     51 
     52      [RTCPeerConnection-setLocalDescription]
     53      2.  If description is set as a local description, then run one of the
     54          following steps:
     55 
     56        [RTCPeerConnection-setLocalDescription-offer]
     57        - If description is of type "offer", set connection.pendingLocalDescription
     58          to description and signaling state to have-local-offer.
     59 
     60        [RTCPeerConnection-setLocalDescription-answer]
     61        - If description is of type "answer", then this completes an offer answer
     62          negotiation.
     63 
     64          Set connection's currentLocalDescription to description and
     65          currentRemoteDescription to the value of pendingRemoteDescription.
     66 
     67          Set both pendingRemoteDescription and pendingLocalDescription to null.
     68          Finally set connection's signaling state to stable
     69 
     70        [RTCPeerConnection-setLocalDescription-rollback]
     71        - If description is of type "rollback", then this is a rollback. Set
     72          connection.pendingLocalDescription to null and signaling state to stable.
     73 
     74        [RTCPeerConnection-setLocalDescription-pranswer]
     75        - If description is of type "pranswer", then set
     76          connection.pendingLocalDescription to description and signaling state to
     77          have-local-pranswer.
     78 
     79    [RTCPeerConnection-setRemoteDescription]
     80    3.  Otherwise, if description is set as a remote description, then run one of the
     81        following steps:
     82 
     83      [RTCPeerConnection-setRemoteDescription-offer]
     84      - If description is of type "offer", set connection.pendingRemoteDescription
     85        attribute to description and signaling state to have-remote-offer.
     86 
     87      [RTCPeerConnection-setRemoteDescription-answer]
     88      - If description is of type "answer", then this completes an offer answer
     89        negotiation.
     90 
     91        Set connection's currentRemoteDescription to description and
     92        currentLocalDescription to the value of pendingLocalDescription.
     93 
     94        Set both pendingRemoteDescription and pendingLocalDescription to null.
     95 
     96        Finally setconnection's signaling state to stable
     97 
     98      [RTCPeerConnection-setRemoteDescription-rollback]
     99      - If description is of type "rollback", then this is a rollback.
    100        Set connection.pendingRemoteDescription to null and signaling state to stable.
    101 
    102      [RTCPeerConnection-setRemoteDescription-rollback]
    103      - If description is of type "pranswer", then set
    104        connection.pendingRemoteDescription to description and signaling state
    105        to have-remote-pranswer.
    106 
    107    [RTCPeerConnection-setLocalDescription]
    108    [RTCPeerConnection-setRemoteDescription]
    109    4.  If connection's signaling state changed above, fire a simple event named
    110        signalingstatechange at connection.
    111 
    112    [TODO]
    113    5.  If description is of type "answer", and it initiates the closure of an existing
    114        SCTP association, as defined in [SCTP-SDP], Sections 10.3 and 10.4, set the value
    115        of connection's [[sctpTransport]] internal slot to null.
    116 
    117    [RTCSctpTransport]
    118    6.  If description is of type "answer" or "pranswer", then run the following steps:
    119 
    120      [RTCSctpTransport]
    121      1.  If description initiates the establishment of a new SCTP association,
    122          as defined in [SCTP-SDP], Sections 10.3 and 10.4, set the value of connection's
    123          [[sctpTransport]] internal slot to a newly created RTCSctpTransport.
    124 
    125      [TODO]
    126      2.  If description negotiates the DTLS role of the SCTP transport, and there is an
    127          RTCDataChannel with a null id, then generate an ID according to
    128          [RTCWEB-DATA-PROTOCOL].
    129 
    130          [Untestable]
    131          If no available ID could be generated, then run the following steps:
    132 
    133            [Untestable]
    134            1.  Let channel be the RTCDataChannel object for which an ID could not be
    135                generated.
    136 
    137            [Untestable]
    138            2.  Set channel's readyState attribute to closed.
    139 
    140            [Untestable]
    141            3.  Fire an event named error with a ResourceInUse exception at channel.
    142 
    143            [Untestable]
    144            4.  Fire a simple event named close at channel.
    145 
    146    [TODO RTCPeerConnection-setDescription-transceiver]
    147    7.  If description is set as a local description, then run the following steps for
    148        each media description in description that is not yet associated with an
    149        RTCRtpTransceiver object:
    150 
    151      [TODO RTCPeerConnection-setDescription-transceiver]
    152      1.  Let transceiver be the RTCRtpTransceiver used to create the media
    153          description.
    154 
    155      [TODO RTCPeerConnection-setDescription-transceiver]
    156      2.  Set transceiver's mid value to the mid of the corresponding media
    157          description.
    158 
    159    [RTCPeerConnection-ontrack]
    160    8.  If description is set as a remote description, then run the following steps
    161        for each media description in description:
    162 
    163      [TODO RTCPeerConnection-setDescription-transceiver]
    164      1.  As described by [JSEP] (section 5.9.), attempt to find an existing
    165          RTCRtpTransceiver object, transceiver, to represent the media description.
    166 
    167      [RTCPeerConnection-ontrack]
    168      2.  If no suitable transceiver is found (transceiver is unset), run the following
    169          steps:
    170 
    171        [RTCPeerConnection-ontrack]
    172        1.  Create an RTCRtpSender, sender, from the media description.
    173 
    174        [RTCPeerConnection-ontrack]
    175        2.  Create an RTCRtpReceiver, receiver, from the media description.
    176 
    177        [RTCPeerConnection-ontrack]
    178        3.  Create an RTCRtpTransceiver with sender, receiver and direction, and let
    179            transceiver be the result.
    180 
    181      [RTCPeerConnection-ontrack]
    182      3.  Set transceiver's mid value to the mid of the corresponding media description.
    183          If the media description has no MID, and transceiver's mid is unset, generate
    184          a random value as described in [JSEP] (section 5.9.).
    185 
    186      [RTCPeerConnection-ontrack]
    187      4.  If the direction of the media description is sendrecv or sendonly, and
    188          transceiver.receiver.track has not yet been fired in a track event, process
    189          the remote track for the media description, given transceiver.
    190 
    191      [TODO RTCPeerConnection-setDescription-transceiver]
    192      5.  If the media description is rejected, and transceiver is not already stopped,
    193          stop the RTCRtpTransceiver transceiver.
    194 
    195 
    196    [TODO RTCPeerConnection-setDescription-transceiver]
    197    9.  If description is of type "rollback", then run the following steps:
    198 
    199      [TODO RTCPeerConnection-setDescription-transceiver]
    200      1.  If the mid value of an RTCRtpTransceiver was set to a non-null value by
    201          the RTCSessionDescription that is being rolled back, set the mid value
    202          of that transceiver to null, as described by [JSEP] (section 4.1.8.2.).
    203 
    204      [TODO RTCPeerConnection-setDescription-transceiver]
    205      2.  If an RTCRtpTransceiver was created by applying the RTCSessionDescription
    206          that is being rolled back, and a track has not been attached to it via
    207          addTrack, remove that transceiver from connection's set of transceivers,
    208          as described by [JSEP] (section 4.1.8.2.).
    209 
    210      [TODO RTCPeerConnection-setDescription-transceiver]
    211      3.  Restore the value of connection's [[SctpTransport]] internal slot to its
    212          value at the last stable signaling state.
    213 
    214    [RTCPeerConnection-onnegotiationneeded]
    215    10. If connection's signaling state is now stable, update the negotiation-needed
    216            flag. If connection's [[NegotiationNeeded]] slot was true both before and after
    217            this update, queue a task that runs the following steps:
    218 
    219      [Untestable]
    220      1.  If connection's [[IsClosed]] slot is true, abort these steps.
    221 
    222      [RTCPeerConnection-onnegotiationneeded]
    223      2.  If connection's [[NegotiationNeeded]] slot is false, abort these steps.
    224 
    225      [RTCPeerConnection-onnegotiationneeded]
    226      3.  Fire a simple event named negotiationneeded at connection.
    227 
    228    [Trivial]
    229    11. Resolve p with undefined.
    230 
    231  [Trivial]
    232  3.  Return p.
    233 
    234 
    235 Coverage Report
    236 
    237  Tested        35
    238  Not Tested    15
    239  Untestable     8
    240  Total         58