<!DOCTYPE html> <html> <body> <video controls onloadedmetadata="myFunction()"> <source src="/static/demo/video/shanghai.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> <script> function myFunction() { alert("Meta data for video loaded"); } </script> </body> </html>