| <!-- This is a test html file for video test. --> |
| <html> |
| <body> |
| <video id='testvideo' controls autoplay muted> |
| </video> |
| </body> |
| |
| <script type="text/javascript"> |
| var corruption = false; |
| var testvideo = document.getElementById('testvideo'); |
| |
| function loadSourceAndRunCorruptionTest(video) { |
| // Listen to the error event for playing corrupted video. |
| testvideo.addEventListener("error", function() { corruption = true; }); |
| |
| testvideo.src = video; |
| testvideo.play(); |
| } |
| |
| function corruptionDetected() { |
| return corruption; |
| } |
| </script> |
| </html> |