mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
0ccb51ddc8
--HG-- extra : rebase_source : bac0027f4bf5d75b8730c44a10141c114002633b
38 lines
936 B
HTML
38 lines
936 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test that a MediaStream source triggers autoplay</title>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
<script type="text/javascript" src="manifest.js"></script>
|
|
</head>
|
|
<body>
|
|
<video id="v1" autoplay></video>
|
|
<video id="v2" autoplay></video>
|
|
<pre id="test">
|
|
<script class="testbody" type="text/javascript">
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
var media = getPlayableVideo(gSmallTests);
|
|
|
|
if (media == null) {
|
|
todo(false, "No media supported.");
|
|
SimpleTest.finish();
|
|
} else {
|
|
v1.src = media.name;
|
|
v2.srcObject = v1.mozCaptureStream();
|
|
var onPlayingEventFired = false;
|
|
|
|
v2.onplaying = function() {
|
|
if(!onPlayingEventFired) {
|
|
onPlayingEventFired = true;
|
|
ok(true, "playback started");
|
|
SimpleTest.finish();
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|