This example demonstrates how to assign an "onended" event to a video element.

Press play and wait for the video to end.

Video courtesy of Big Buck Bunny.