Don’t know whether your visitors are going to be able to use Flash or HTML5 for video and audio playback? Don’t guess, take a look at the jPlayer project. jPlayer is an HTML5 audio/video library for jQuery that supports real cross platform audio and video.
Me? I’m a fan of HTML5 solutions, not so much the Adobe Flash solutions – especially since Adobe is essentially abandoning Linux. But you can’t assume that all users are using a browser that can support HTML5 playback. And you can’t assume they’re on a platform that has Flash support, either.
The jPlayer project handles this by providing fallback support for either one. You can choose to go with Flash by default, HTML5 as a fallback or HTML5 by default, with Flash as the fallback. One way or another, almost all bases should be covered. jPlayer has support for Firefox, Chrome, Opera, Safari, IE6 through IE9, Mobile Safari, the Android 2.3 browser, and BlackBerry’s OS7 phone browser and PlayBook browser.
It also has support for plenty of media types: MP3, MP4 (AAC or H.264), Ogg Vorbis/Theora, WebM, WAV, and FLV.
One of the reasons I like jPlayer is its extensive documentation and API reference. The project also supplies plenty of demos to see how jPlayer might be used for video or audio players on a site. (Note, I do believe that “Big Buck Bunny” has now established itself as the “Hello World” of video examples.)
There’s an instance on JSFiddle if you want to mess around with jPlayer in real time. The Quick Start Guide should, well, get you started. The downloads page also has a zip file of the demos which should help.
jPlayer is developed by a small Web development firm, Happyworm. It’s available under the MIT and GPLv3, so one of those licenses should work for just about any project you’re interested in. You can grab it, and send pull requests, on GitHub. The team is prepping for a new release so now would be a good time to get requests in.