Home Services Tutorials Articles Resources Contact Us

Link to iTunes From Your iPhone Website

While considering audio solutions for a current microsite project we came across several items worth noting with regard to presenting audio to your users. In the following article we’ll explain how to interact with the iTunes wi-fi music store from your website, and show you how to get your (or your clients) music on iTunes.

Support
The iPhone audio support is acceptable, allowing playback of the following media types for users with software version 1.1.1 or higher.

  • AAC (16 to 320 Kbps)
  • AIFF

  • AAC Protected (MP4 from iTunes Store)

  • MP3 (16 to 320 Kbps)
  • MP3 VBR
Audible (formats 2-4)
  • Apple Lossless
WAV

The UI experience when viewing audio from a website is quite seamless, providing the file information and controls to forward and reverse the play head as well as adjust the volume throughout the song. When you are done listening simply tap the “done” button to return to the originating page. One could easily add complete audio catalogs to their microsite designs in much the same fashion as current http based solutions, but that is a topic for you to explore.

Integration with iTunes
One of the key benefits of microsite development is the ability to tap into iPhone applications and data sources, which is exactly what we have done here. Users can interact with the iTunes microstore directly from your microsite. Using standard http requests we can direct users to any song, artist or album in their library.

This is a three-step process, first you will get your music into iTunes, then you can set up a link to that music. Finally, you will integrate the content into your microsite. Lets get to it.

Getting your music onto iTunes
If you just want to link to your favorite songs from your microsite you can skip this step. Technically, there are several methods to get your songs onto iTunes, however this isn’t as simple as it sounds.

Unless you are independent label or a major record label, you aren’t going to be able to work directly with Apple. Due to the sheer volume of interest in distribution through the iTunes store, Apple’s policies dictate that you a partner with an established distributor.

This is where Tunecore comes in. In a nutshell, they allow you to piggyback your music onto iTunes through their services. We are currently their newest customer, but wikipedia states them as being in business since 2005 so apart from the wait time (60 days) it would appear to be a valid solution. They are nominally fee based but allow you to receive all profits from Apple for sale of your music.

Linking to your music in the iTunes music store
Still with us? Good. Here’s where we tie it all together.

 The iTunes link maker - This (iPhone accessible) web app lets you input an artist or song from the iTunes store and returns a hyperlink to that song which can be embedded in your webpage. 

Here’s an example result for the Yael Naïm, the artist from macbook air’s commercial:

<a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=266125377&id=266125243&s=143441"><img height="15" width="61" alt="Yael Naïm - Yael Naïm - New Soul" src="http://ax.phobos.apple.com.edgesuite.net/images/
badgeitunes61x15dark.gif" /></a>

This will generate the following sample button: Yael Naïm - Yael Naïm - New Soul

Clicking this hyperlink from your website in MobileSafari will open the iTunes microstore on your iPhone and automatically show the song.

This is also applicable to albums and artists, but no other variables we are aware of at this time.

Several points worth noting, this method currently does not support pod casting. Attempting to access pod casts in this fashion will result in an apple generated error page informing the user the item is inaccessible from your device, and directing them to the iTunes store. Also, audio book queries weren’t returning any results during our tests so support options are unclear. iTunes video is also unsupported, obviously, due to lack of support in the Wi-Fi Music Store and presumably the YouTube partnership.

Integration
Once you’ve generated the hyperlink to your iTunes content you simply embed that in the body of any HTML page and request it through MobileSafari. We’ve included a scren grab of the result from the example above.

Your microsite visitors now have direct 1-click access to purchase your music through the iTunes wi-fi music store, and you get to keep all the profit. Enjoy.
-Shaun Mackey

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

49