tor-browser

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

screenshare.https.html (1102B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>RTCPeerConnection Screen-sharing Simulcast Tests</title>
      4 <meta name="timeout" content="long">
      5 <script src="../third_party/sdp/sdp.js"></script>
      6 <script src="simulcast.js"></script>
      7 <script src="../RTCPeerConnection-helper.js"></script>
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/resources/testdriver.js"></script>
     11 <script src="/resources/testdriver-vendor.js"></script>
     12 <script>
     13 promise_test(async t => {
     14  // Test getDisplayMedia with simulcast
     15  await test_driver.bless('getDisplayMedia');
     16  const stream = await navigator.mediaDevices.getDisplayMedia({
     17    video: {width: 640, height: 480}
     18  });
     19  t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
     20  const rids = [0, 1];
     21  const pc1 = new RTCPeerConnection();
     22  t.add_cleanup(() => pc1.close());
     23  const pc2 = new RTCPeerConnection();
     24  t.add_cleanup(() => pc2.close());
     25 
     26  return negotiateSimulcastAndWaitForVideo(t, stream, rids, pc1, pc2);
     27 }, 'Basic simulcast setup with two spatial layers');
     28 </script>