2013-03-27 16:46:31 -07:00
|
|
|
<!DOCTYPE HTML>
|
2012-11-26 18:27:46 -08:00
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=781534
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>mozGetUserMedia Basic Video Test</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="application/javascript" src="head.js"></script>
|
|
|
|
<script type="application/javascript" src="mediaStreamPlayback.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Video Test</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
2013-01-17 13:33:02 -08:00
|
|
|
<video id="testVideo"></video>
|
2012-11-26 18:27:46 -08:00
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
2013-01-17 13:33:02 -08:00
|
|
|
/**
|
|
|
|
* Run a test to verify that we can complete a start and stop media playback
|
|
|
|
* cycle for an video LocalMediaStream on a video HTMLMediaElement.
|
|
|
|
*/
|
|
|
|
runTest(function () {
|
|
|
|
var testVideo = document.getElementById('testVideo');
|
2013-05-05 19:48:37 -07:00
|
|
|
var constraints = {video: true};
|
2013-01-17 13:33:02 -08:00
|
|
|
|
2013-05-05 19:48:37 -07:00
|
|
|
getUserMedia(constraints, function (aStream) {
|
|
|
|
checkMediaStreamTracks(constraints, aStream);
|
2013-02-07 17:35:17 -08:00
|
|
|
|
2013-05-05 19:48:37 -07:00
|
|
|
var playback = new LocalMediaStreamPlayback(testVideo, aStream);
|
2013-02-07 17:35:17 -08:00
|
|
|
playback.playMedia(false, function () {
|
2013-01-17 13:33:02 -08:00
|
|
|
aStream.stop();
|
|
|
|
SimpleTest.finish();
|
2014-03-24 20:57:15 -07:00
|
|
|
}, generateErrorCallback());
|
2013-02-07 17:35:17 -08:00
|
|
|
|
2014-03-24 20:57:15 -07:00
|
|
|
}, generateErrorCallback());
|
2013-02-07 17:35:17 -08:00
|
|
|
|
2013-05-02 10:33:15 -07:00
|
|
|
});
|
2012-11-26 18:27:46 -08:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|