tor-browser

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

capture_video_user-manual.html (1536B)


      1 <!DOCTYPE html>
      2 <meta charset='utf-8'>
      3 <title>HTML Media Capture Test: capture video with 'user' facing mode to produce one video 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 camera/microphone permissions before running this test. If prompted for permission, please allow.</p>
     13 
     14 <p>After hitting the button below, the camera must be launched with self-view mode.</p>
     15 
     16 <p>(Note: If the user agent is unable to support the preferred facing mode, it can fall back to the implementation-specific default facing mode.)</p>
     17 
     18 <p>Capture a video and then confirm the capturing.</p>
     19 
     20 <p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>
     21 
     22 <input type='file' accept='video/*' capture='user'>
     23 
     24 <div id='log'></div>
     25 
     26 <script>
     27  var input;
     28 
     29  setup(function() {
     30    input = document.querySelector('input[type=file]');
     31  }, {explicit_done: true});
     32 
     33  async_test(function(t) {
     34    input.onchange = t.step_func_done(function() {
     35      assert_equals(input.files.length, 1, 'Should capture one file');
     36      assert_regexp_match(input.files[0].type, /^video\//, 'The captured file should be type of video');
     37    });
     38    done();
     39  });
     40 </script>