dom/media/tests/mochitest/test_getUserMedia_playAudioTwice.html
author Alexis Beingessner <a.beingessner@gmail.com>
Thu, 10 Oct 2019 23:10:28 +0000
changeset 552383 b6d82b1a6b027461055a92f052d6d0511086a5bb
parent 497044 9508a03be7c2ed82678cf62b0ba5356826738e9b
permissions -rw-r--r--
Bug 1587155 - Block all hardware acceleration for AMD driver 22.19.162.4. r=jrmuizel a=lizzard Driver's Haunted. Differential Revision: https://phabricator.services.mozilla.com/D48900

<!DOCTYPE HTML>
<html>
<head>
  <script type="application/javascript" src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<script type="application/javascript">
  createHTML({title: "getUserMedia Play Audio Twice", bug: "822109" });
  /**
   * Run a test that we can complete an audio playback cycle twice in a row.
   */
  runTest(function () {
    return getUserMedia({audio: true}).then(audioStream => {
      var testAudio = createMediaElement('audio', 'testAudio');
      var playback = new MediaStreamPlayback(testAudio, audioStream);

      return playback.playMediaWithoutStoppingTracks(false)
        .then(() => playback.playMedia(true));
    });
  });
</script>
</pre>
</body>
</html>