36 lines
922 B
HTML
36 lines
922 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Replacing Contents Clipped</title>
|
|
<script src="../../media/media-file.js"></script>
|
|
<script>
|
|
if (window.testRunner) {
|
|
window.testRunner.dumpAsText(true);
|
|
window.testRunner.waitUntilDone();
|
|
}
|
|
|
|
function runTest() {
|
|
var video = document.getElementsByTagName('video')[0];
|
|
video.addEventListener('canplaythrough', endTest);
|
|
video.src = findMediaFile('video', '../../media/content/test');
|
|
video.load();
|
|
}
|
|
|
|
function endTest() {
|
|
if (window.testRunner)
|
|
setTimeout(function() { testRunner.notifyDone(); }, 150);
|
|
}
|
|
</script>
|
|
<style>
|
|
video {
|
|
width: 200px;
|
|
height: 200px;
|
|
object-fit: cover;
|
|
background-color: red;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body onload="runTest()">
|
|
<button onclick="runTest()">run test</button><br>
|
|
<video></video>
|
|
</body> |