tor-browser

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

GUM-echoCancellation-all.https.html (987B)


      1 <!doctype html>
      2 <title>getUserMedia echoCancellation remote-only</title>
      3 <p class="instructions">When prompted, accept to share your audio stream.</p>
      4 <meta name=timeout content=long>
      5 <script src=/resources/testharness.js></script>
      6 <script src=/resources/testharnessreport.js></script>
      7 <script src=/resources/testdriver.js></script>
      8 <script src=/resources/testdriver-vendor.js></script>
      9 <script src=permission-helper.js></script>
     10 <script>
     11  'use strict'
     12 
     13  // https://w3c.github.io/mediacapture-main/#dom-echocancellationmodeenum-all
     14 
     15  promise_test(async t => {
     16    await setMediaPermission("granted", ["microphone"]);
     17    const stream = await navigator.mediaDevices.getUserMedia({
     18      video: false,
     19      audio: {echoCancellation: {exact: "all"}},
     20    });
     21    const track = stream.getAudioTracks()[0];
     22    t.add_cleanup(() => track.stop());
     23    const settings = track.getSettings();
     24    assert_equals(settings.echoCancellation, "all");
     25  }, 'getUserMedia suports "all"');
     26 
     27 </script>