This example demonstrates how to assign an "onloadedmetadata" event to a video element.
Video courtesy of Big Buck Bunny.