<html> <body> <video src="../media/bear.ogv" id="video"></video> <script> elem = document.getElementById("video"); elem.addEventListener("loadedmetadata", function() { domAutomationController.setAutomationId(0); domAutomationController.send("FINISHED"); }); elem.load(); </script> </body> </html>