One of my current clients recently commissioned me to write a feature for their site that allows visitors to listen to snippets of MP3 tracks that they sell directly from within the product’s “detail” page. In my particular situation, one of the requirements was to use the design commissioned by a separate design firm. In doing some research I found a few different open source methods of accomplishing this. The one that turned out to be the best fit for our situation was an Adobe Flash-based application called NiftyPlayer.
<a href="#" onClick="niftyPlayer('previewPlayer').loadAndPlay('fileName.mp3')"> Play </a>
Because of Flash’s near-ubiquitous install base, NiftyPlayer is a great option to easily add MP3 playback capability to your web application and know that it’ll “just work”.