tor-browser

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

test_peerConnection_audioRenegotiationInactiveAnswer.html (1954B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <script type="application/javascript" src="pc.js"></script>
      5  <script type="application/javascript" src="sdpUtils.js"></script>
      6 </head>
      7 <body>
      8 <pre id="test">
      9 <script type="application/javascript">
     10  createHTML({
     11    bug: "1213773",
     12    title: "Renegotiation: answerer uses a=inactive for audio"
     13  });
     14 
     15  runNetworkTest(function (options) {
     16    const helper = new AudioStreamFlowingHelper();
     17 
     18    const test = new PeerConnectionTest(options);
     19    test.setMediaConstraints([{audio: true}], []);
     20    let haveFirstUnmuteEvent;
     21 
     22    test.chain.insertBefore("PC_REMOTE_SET_LOCAL_DESCRIPTION", [
     23      function PC_REMOTE_SETUP_ONUNMUTE_1() {
     24        haveFirstUnmuteEvent = haveEvent(test.pcRemote._pc.getReceivers()[0].track, "unmute");
     25      }
     26    ]);
     27 
     28    test.chain.append([
     29      function PC_REMOTE_CHECK_AUDIO_UNMUTED() {
     30        return haveFirstUnmuteEvent;
     31      },
     32      function PC_REMOTE_CHECK_AUDIO_FLOWING() {
     33        return helper.checkAudioFlowing(test.pcRemote._pc.getRemoteStreams()[0]);
     34      }
     35    ]);
     36 
     37    addRenegotiation(test.chain, []);
     38 
     39    test.chain.insertAfter("PC_LOCAL_GET_ANSWER", [
     40        function PC_LOCAL_REWRITE_REMOTE_SDP_INACTIVE(test) {
     41          test._remote_answer.sdp =
     42            sdputils.setAllMsectionsInactive(test._remote_answer.sdp);
     43        }
     44    ], false, 1);
     45 
     46    test.chain.append([
     47      function PC_REMOTE_CHECK_AUDIO_NOT_FLOWING() {
     48        return helper.checkAudioNotFlowing(test.pcRemote._pc.getRemoteStreams()[0]);
     49      }
     50    ]);
     51 
     52    test.chain.remove("PC_REMOTE_CHECK_STATS", 1);
     53    test.chain.remove("PC_LOCAL_CHECK_STATS", 1);
     54    test.chain.remove("PC_REMOTE_WAIT_FOR_MEDIA_FLOW", 1);
     55 
     56    addRenegotiation(test.chain, []);
     57 
     58    test.chain.append([
     59      function PC_REMOTE_CHECK_AUDIO_FLOWING_2() {
     60        return helper.checkAudioFlowing(test.pcRemote._pc.getRemoteStreams()[0]);
     61      }
     62    ]);
     63 
     64    return test.run();
     65  });
     66 </script>
     67 </pre>
     68 </body>
     69 </html>