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