tor-browser

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

capture_audio-manual.html (1291B)


      1 <!DOCTYPE html>
      2 <meta charset='utf-8'>
      3 <title>HTML Media Capture Test: capture audio to produce one audio file</title>
      4 <link rel='author' title='Intel' href='http://www.intel.com'>
      5 <link rel='help' href='https://w3c.github.io/html-media-capture'>
      6 <link rel='help' href='https://www.w3.org/TR/html5/forms.html#attr-input-accept'>
      7 <meta name='flags' content='interact'>
      8 <meta name="timeout" content="long">
      9 <script src='/resources/testharness.js'></script>
     10 <script src='/resources/testharnessreport.js'></script>
     11 
     12 <p>Clear all microphone permissions before running this test. If prompted for permission, please allow.</p>
     13 
     14 <p>After hitting the button below, capture an audio and then confirm the capturing.</p>
     15 
     16 <p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>
     17 
     18 <input type='file' accept='audio/*' capture>
     19 
     20 <div id='log'></div>
     21 
     22 <script>
     23  var input;
     24 
     25  setup(function() {
     26    input = document.querySelector('input[type=file]');
     27  }, {explicit_done: true});
     28 
     29  async_test(function(t) {
     30    input.onchange = t.step_func_done(function() {
     31      assert_equals(input.files.length, 1, 'Should capture one file');
     32      assert_regexp_match(input.files[0].type, /^audio\//, 'The captured file should be type of audio');
     33    });
     34    done();
     35  });
     36 </script>