added now mandatory error callback param
authorDominique Hazael-Massieux <dom@w3.org>
Thu, 30 May 2013 14:11:43 +0200
changeset 31 637d5799ba58
parent 30 92e9067a383e
child 32 344cd96e7c98
added now mandatory error callback param
returns exactly one video stream
localmediastream no longer exists
submitted/W3C/video.html
--- a/submitted/W3C/video.html	Thu May 30 14:09:31 2013 +0200
+++ b/submitted/W3C/video.html	Thu May 30 14:11:43 2013 +0200
@@ -1,7 +1,7 @@
 <!doctype html>
 <html>
 <head>
-<title>getUserMedia({video:true}) creates a stream with at least a video track</title>
+<title>getUserMedia({video:true}) creates a stream with one video track</title>
 <link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
 <link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia">
 <link rel='stylesheet' href='/resources/testharness.css' media='all'/>
@@ -9,7 +9,7 @@
 <body>
 <p>When prompted, accept to share your video stream.</p>
 <h1>Description</h1>
-<p>This test checks that the LocalMediaStream object returned by the success callback in getUserMedia has at least one video track and no audio.</p>
+<p>This test checks that the MediaStream object returned by the success callback in getUserMedia has exactly one video track and no audio.</p>
 
 <div id='log'></div>
 <script src=/resources/testharness.js></script>
@@ -20,11 +20,11 @@
 var t = async_test("Tests that a MediaStream with at least one video track is returned");
 t.step(function() {
   navigator.getUserMedia({video: true}, t.step_func(function (stream) {
-    assert_true(stream instanceof LocalMediaStream, "getUserMedia success callback comes with a LocalMediaStream object");
+    assert_true(stream instanceof MediaStream, "getUserMedia success callback comes with a MediaStream object");
     assert_equals(stream.audioTracks.length, 0, "the media stream has zero audio track");
-    assert_true(stream.videoTracks.length >= 1, "the media stream has at least one video track");
+    assert_equals(stream.videoTracks.length, 1, "the media stream has exactly one video track");
     t.done();
-  }));
+  }), function(error) {});
 });
 </script>
 </body>