dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStreamWithFollowupVideoAudio.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=822109
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>mozGetUserMedia Stop Video+Audio Stream With Followup Video+Audio</title>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    11   <script type="application/javascript" src="head.js"></script>
    12   <script type="application/javascript" src="mediaStreamPlayback.js"></script>
    13 </head>
    14 <body>
    15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=822109">mozGetUserMedia Stop Video+Audio Stream With Followup Video+Audio</a>
    16 <p id="display"></p>
    17 <div id="content" style="display: none">
    18   <video id="testVideo"></video>
    19 </div>
    20 <pre id="test">
    21 <script type="application/javascript">
    23   /**
    24    * Run a test to verify that I can complete an video+audio gum playback in a
    25    * media element, stop the stream, and then complete another video+audio gum
    26    * playback in a media element.
    27    */
    28   runTest(function () {
    29     getUserMedia({video: true, audio: true}, function(firstStream) {
    30       var testVideo = document.getElementById('testVideo');
    31       var streamPlayback = new LocalMediaStreamPlayback(testVideo, firstStream);
    33       streamPlayback.playMediaWithStreamStop(false, function() {
    34         getUserMedia({video: true, audio: true}, function(secondStream) {
    35           streamPlayback.mediaStream = secondStream;
    37           streamPlayback.playMedia(false, function() {
    38             secondStream.stop();
    39             SimpleTest.finish();
    40           }, generateErrorCallback());
    42         }, generateErrorCallback());
    44       }, generateErrorCallback());
    46     }, generateErrorCallback());
    47   });
    49 </script>
    50 </pre>
    51 </body>
    52 </html>

mercurial