New JQuery Plugin

Easy-to-use Event Manager for HTML5 Video / Audio and eventually Quicktime and SoundManager2

This draft is poorly written

API

You'll have an object that lets you attach or execute functions like this.

media.play() // Plays the media
media.togglePause() // Toggles the playing and pausing of the media
media.play(function(){}) // Adds a function to execute when the media is played
media.play(options) // Plays the media (may also execute the "play" function, with options)
media.mute() // Mutes the media

media.position() // current position of time within the media in ms
media.position(3500) // moves to the current position of time within the media in ms
media.volume() // returns the current volume of the media
media.volume(50) // sets the volume of the media
media.whilePlaying(function(){}) // adds a function to execute while the media is playing
media.load(function(){}) // adds a function to execute when the media is loaded
media.load('video.mp4') // attempts to load the media specified
media.fail(function(errors){}) // adds a function to execute when the media fails to load (with errors)