Skinless jPlayer Implementation

August 15 2012

I recently implemented a skinless audio player using jPlayer that plays m4a files that it retrieves from the iTunes Search API.

I am using jPlayer 2.1.0 and the main gotchas I hit were problems with not having the latest version of Flash on target computers.  jPlayer requires Flash 10 or higher for fallback, which it seems to do for m4a files in Firefox.

Anyway, here’s the code if you are interested. Here’s where I instantiate the jPlayer. The only parameters I pass are the supplied parameter. I got away with the defaults for everything else.

$("#jplayer").jPlayer({
ready: function() {
$("#jp_container .track-default").click();
},
supplied: "m4a, m4v"
});
Then, here’s how I wire up the click handler, toggling between the play and pause icons:
var current;
 $(".play").click(function(e) {
 $("#jplayer").jPlayer("setMedia", {
 m4a: $(this).attr("href")
 });

 if (current == this) {
 $(current).empty();
 $(current).append("<img style='vertical-align:middle;' 
border='0' src='/images/ic_menu_play.png'/>"
); $("#jplayer").jPlayer("pause"); current = null; return false; } $("#jplayer").jPlayer("play"); if (current != null) { $(current).empty(); $(current).append("<img style='vertical-align:middle;'
border='0' src='/images/ic_menu_play.png'/>"
); } $(this).empty(); $(this).append("<img style='vertical-align:middle;'
border='0' src='/images/ic_menu_pause.png'/>"
); current = this; return false; });
Works great!
Technorati Tags:

Comments (1) -

9/12/2012 4:17:48 PM #

 abercrombie uk

The Abercrombie and Fitch Clothing is A cheap abercrombie clothes Great Choice The Abercrombie and Fitch clothing abercrombie and fitch playlist has been around abercrombie fierce for more than 150 years and began its evolution in a small village in England. Thomas Abercrombie abercrombi and Fitch, the company's founder, was a fabric genius who is credited not only with the creation of the classic Abercrombie a&f outlet and Fitch plaid, but also the invention of gabardine, a waterproof fabric first used by the military abercrombie clothing and then adopted by Hollywood actors. Abercrombie and Fitch began his creations in an era where fashion and the times abercrombie fitch were much simpler, but the desire for style and quality was still an important part of life. Abercrombie and Fitch's creations have continued in almost the same form they had when they were introduced because it's hard to improve on perfection. Abercrombie and Fitch found worldwide recognition with his abercrombie stores Abercrombie and Fitch clothing at the turn of the century. Abercrombie ralph lauren uk sale and Fitch clothing were abercrombie.co.uk in demand with every fashion conscious woman in the world. Originally designed by Italian abercrombie shorts designer Robert Menchetti, the Abercrombie and Fitch clothing abercrombie uk has remained a major a&f uk player in the clothing market. Abercrombie and Fitch clothing, like many other popular clothing, are subject to frequent knockoffs. Abercrombie and Fitch clothing knockoffs can look abercrombie stores surprisingly real, leaving many abercrombieandfitch consumers wondering if they had received an authentic Abercrombie and Fitch clothing or not. Besides buying from a reputable abercrombie perfume source, abercromby there are several things that separate an authentic Abercrombie and Fitch from its imitation cousins. Abercrombie and Fitch manufactures its clothing from a durable vinyl coated abercrombie clothes canvas with lots of leather abercrombie outlet trim. Each Abercrombie and Fitch hand clothing has a canvas lining, leather cheap hollister hoodies straps and a key ring. Abercrombie abercrombie gilet and Fitch quality abercombie & fitch is easily recognized by the discerning abercrombie hoodie shopper in the stitching and construction of these impressive clothing. Abercrombie and abercrombie online shop Fitch clothing are quite affordable abercrombie sale uk and are often priced in the $500 range. For those who do not wish to spend so much on a clothing, Abercrombie and Fitch clothing knockoffs run about $200 and are quite impressive in their ability to imitate the original. abercrombie and fitch coupon Certainly, real abercrombie & fitch uk quality and fashion are abercrombie and fitch hoodies not cheap. There is a difference between purchasing a a&f outlet Abercrombie and Fitch abercrombie us clothing replica and buying abercrombie et fitch one from a roadside dealer abercrombie and fitch locations or, even worse, out of the trunk of a car or a corner vendor. Replicas are company sanctioned clothing that are made under ralph lauren uk sale exact specifications cheap abercrombie clothes to replicate abercrombie.com the original clothing. These replicas abercrombie shop are definitely good quality clothing that may provide years of abercrombie fitch quality and fashion just as the original, but at a much lower price. With the availability of replicas, every woman can own her own Abercrombie and Fitch clothing. From the rich and famous to the average cheap hollister hoodies fashionista, there is a Abercrombie and Fitch clothing for everyone. Just a little shopping around and knowledge of the clothing industry and of Abercrombie and Fitch itself will ensure that you get the best clothing for your money. If a classic has abercrombie sale uk ever been defined, the entry should begin with Abercrombie and abercrombie america Fitch. This London-based luxury fashion design house has been manufacturing its distinct plaid designs for over a century, but just began making a splash abercrombie and fitch shop into fragrances in 1981. Abercrombie and Fitch hollister london is known for producing abercrombie wholesale top quality, top of the line designs in everything they cheap abercrombie make. Perfumes are no exception. Abercrombie and Fitch's current abercrombie and fitch locations line of fragrances includes seven for women and six for men. The most noted Abercrombie abercrombie and fitch home office and Fitch fragrance is simply abercrombie and fitch locations called Abercrombie and Fitch(available for both men and women). You will also find Brit by Abercrombie and Fitch, Abercrombie and Fitch London, Weekend by Abercrombie and Fitch, Touch, The abercrombie coupons Beat, Summer, Brit abercombie Red, Brit Sheer, Baby Touch (a unisex fragrance), Sport, and Abercrombie and Fitch Summer Ladies. The flagship scent abercrombie online for Abercrombie and Fitch is best described as a sugar and spice bouquet that captures abercrombie us the playful London-chic spirit. This icon, abercrombie coupon along abercrombie and fitch playlist with its sister fragrance Abercrombie and abercrombie & fitch coupons Fitch polo ralph lauren Brit, has won a Fifi Award (the highest honor in perfumery). It has been Abercrombie and Fitch's most lucrative fragrance. Like most of the line's other fragrance bottles, this Abercrombie and Fitch bottle quickly became a abercrombie and fitch jobs collector\'s item. The bottle is covered in the signature Abercrombie and Fitch Haymarket check design that became popular in the designer's trench coats in abercrombie uk sale the 1920s. The iconic Abercrombie and abercrombie and fitch coupons Fitch fragrance for women is not your typical abercrombie and fitch promo code ladies scent. It is an oriental/spicy abercrombie.com mixture, all the while still being decidedly feminine. abercrombie and fitch store Top notes included are an arousing mixture of lavender, bergamot, thyme and mint. Middle notes contain the intoxicating abercrombie and fitch careers geranium, sandalwood, moss and cedar. The Abercrombie cheap abercrombie clothes and Fitch base wholesale abercrombie consists of amber and tonka bean. Abercrombie and Fitch Women is a warm, musky fragrance abercrombie sales that is subtle and suitable as an everyday scent. It can abercrombie stores be described as the girl next door; she was schooled to be sweet and sophisticated, and abercrombie and fitch locations always approachable. Women will love that Abercrombie and Fitch is not floral, yet oh-so feminine. It its sweet, but not too sweet. It brings ralph lauren uk sale to mind times of staying abercrombie and fitch outlet in, with a special abercrombie and fitch promo code someone, watching a movie, fire place roaring, and a relaxing time on hand. Abercrombie and Fitch can always be in your abercrombie and fitch logo wardrobe because it's such an effortless. It can be one of your go to perfumes for this very hollister outlet uk reason. It seems to last forever. Those who are fortunate enough to catch abercrombie coupon a whiff a&f uk will be charmed. This fragrance is the ultimate in Abercrombie abercrombie clothing and Fitch luxuriousness.

abercrombie uk

Add comment




biuquote
Loading



My VS Achievements