Popcorn.js is an open soruce event framework for HTML5
<video> that provides a simple API for synchronizing interactive and immersive content. Popcorn.js utilizes the native HTMLVideoElement properties, methods and events, normalizes them into an easy to learn API, and provides a plugin system for community contributed interactions.
The framework also provides a plugin system for community contributed interactions.
There are many functions provided for controlling the video like getting the duration, setting the playback rate or changing the volume.
And, there is Butter which is again an open source resource for authoring Popcorn.js.