The Mac Observer

MGG Answers

Stream Videos and Music From Your Mac To Your iPhone or iPad

Dave Hamilton
TMO Talk (76)

Question:

Jordan writes: How do I stream the movies and music in my iTunes library directly to my iPad or iPhone? I can stream to another Mac using iTunes Sharing, but that doesn’t seem to be accessible from my iPad or iPhone even if I’m on the same WiFi network.

Answer:

This is an interesting one, Jordan, and while it requires a few steps, it is possible, and it is free! In a nutshell, you need to do only two things: enable websharing on your Mac, and then make your iTunes media folder accessible from the web. Once you do that, you can then use Safari on your iPhone or iPad to play or listen to music streamed from your Mac. As an added benefit, because Safari is currently allowed to “multitask” and run in the background on those devices, you can listen to your streamed music while doing other things on the device!

Step 1: Link Your iTunes Folder To Your Web Share

Mac OS X’s Web Sharing enables you (and others, more on that below) to browse the contents of both the /Library/WebServer/Documents/ folder as well as the “Sites” folder in your home directory from the web. Your iTunes media, of course, is stored elsewhere, so the simplest way to resolve that is to put a link to your iTunes folder inside one of the folders that Web Sharing sees. There are other ways, but doing it this way keeps you from having to move your iTunes Library anywhere. For our purposes (and to save from editing Unix configuration files) we’ll put our links in the former (non-User folder) directory.

Normally if you wanted to create a link in Mac OS X, you would use the Finder’s “Make Alias” function. Unfortunately, Web Sharing and Aliases don’t play nice together. Because Mac OS X’s Web Sharing uses the open-source Apache web server, we need to treat it like a Unix program. And Unix programs prefer what’s called “symbolic links” (or “symlinks”) instead of aliases. This involves a quick trip to the terminal, but I promise it won’t be too scary.

Open your Terminal (in Applications->Utilities->Terminal) and type the following command (you can copy and paste from here, if you like):

ln -s ~/Music/iTunes/iTunes\ Media/Music/ /Library/WebServer/Documents/music

As a bonus, if you’d like to have quick and easy access to your movies, as well, type the following:

ln -s ~/Music/iTunes/iTunes\ Media/Movies/ /Library/WebServer/Documents/movies

Note, the above two commands assume you’re using the latest iTunes media folder organization available in iTunes 9. If those commands don’t work, try either of these pairs depending on where and how your iTunes media is set up.

ln -s ~/Music/iTunes/iTunes\ Music/Music/ /Library/WebServer/Documents/music

ln -s ~/Music/iTunes/iTunes\ Music/Movies/ /Library/WebServer/Documents/movies

or

ln -s ~/Music/iTunes/iTunes\ Music/Music/ /Library/WebServer/Documents/music

ln -s ~/Music/iTunes/iTunes\ Music/Music/Movies/ /Library/WebServer/Documents/movies

Step 2: Set The Right Permissions

Your Mac is picky about which files can be accessed by whom. This is a good thing, and it protects your documents and files, assuming you store them where Apple expects. Your Music folder is, by default, only readable by you. For it to be readable by the Web Server (and, by proxy, you or anyone else accessing your Mac via the web interface) we need to loosen up its permissions a bit. To do this, go into the Finder, choose your home folder, highlight the Music folder, and click File->Get Info. You’ll want to change the “everyone” permissions from “No Access” to “Read only”. Once that’s done, close the window.

Step 3: Enable Web Sharing

The final step is to enable Web Sharing on your Mac. To do this, simply launch System Preferences, click on Sharing, and click the checkbox next to “Web Sharing”. You may be asked to enter an Administrator password to do this. We’ve highlighted it in red below.

Step 4: Browse To Your Music Library

While you’re there in the Sharing preference pane, you’ll also see a link labeled “Your computer’s website is available at this address”. We’ve highlighted it in green above. Once Web Sharing is enabled, click on this link and you’ll be brought to your browser of choice (and hopefully you’ll see a very basic website!). Now, the trick is to append either “music” or “movies” to whatever address appears in your title bar.

This should then bring you to a screen where you can navigate your Mac’s music library and, as you drill down, select and play songs. If it works here, it will likely work on your iPhone or iPad with the same address. If it does not, try replacing whatever address it says with your Mac’s IP address (i.e. http://192.168.1.101/music) and see if that works.

Also, if you sync your Safari bookmarks with MobileMe, just add these links to Safari on your Mac and magically they’ll be there for you on your iPhone, iPad, and iPod touch. 

Safety and Security

It’s important to note that you have now shared your music library with anyone who can access your Mac over the Internet. Most of you won’t have to worry, though, since your standard Apple AirPort or 3rd-party (Linksys, Netgear, etc) router will NOT route web requests to your Mac by default. It can be done, of course, but if you’ve done that, you probably know how it all works anyway. 

 

This question was originally answered on MGG 257: Bookmarks, Symlinks, Spotlight Security & Geek Challenges

About MGG Answers:

Each week Dave Hamilton and John F. Braun provide some great troubleshooting advice to listeners of the Mac Geek Gab podcast. Here with MGG Answers we share some of those tips with the rest of the world!

 

Recent Headlines - Updated February 22nd

Wed, 6:11 PM
News - Microsoft Launches European Antitrust Suit Against Moto
3:57 PM
News - Proview Seeks iPad Ban in Shanghai
2:24 PM
Deal Brothers - Sharper Image Computer Desk with 3-Port USB Hub: $89.99
1:23 PM
News - Adobe Lays Out the Future of Flash
10:54 AM
News - Beatles Ringtones Come to Apple’s iTunes Store
10:16 AM
Hot Forum Topic - Reader Discussion: Apple Share Dividend or Buyback
9:37 AM
News - ABC Offers Apple, Foxconn Special Online
8:55 AM
News - Apple Confirms Plans for Oregon Data Center
8:35 AM
TMO Quick Tip - Apple Mail: Adding Links to Text
Tue, 7:05 PM
News - Apple Begins Encouraging MobileMe-to-iCloud Migration
5:44 PM
Product News - B&N Fights Fire with $199 Nook Tablet
4:50 PM
Hidden Dimensions - Apple Customers Can Sometimes Just Say No
 

The Mac Observer Reader Specials

  • TypeStyler 11 is now in the Mac App Store!! -- Special Introductory Price of $59.95!! -- To Buy From The Mac App Store Click Here Now!! Or buy direct from Strider Software.
  • Mac RAM Upgrades: MacBook Pro 16GB kits $475, 8GB Kits for $119.99! iMac 16GB RAM Kits (4x 4GB) for $229.99! Mac Pro Memory 32GB Kit for $399.99, 64GB Kit for $889.99! Mac Hard Drives 2TB Seagate SATA II for $249.99! Click Here!
  • Poker Mac If you're using a Mac, then you've gotta check out Online Poker Mac. This mac poker and online casino mac site actually does the unthinkable, it actually rewards!

Apple Stock Quote (AAPL)

Loading...

Hot Topics

TMO Express

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday. Find out more!

Top Deals From DealBrothers.com

Recent Features

Support The Mac Observer

We noticed you may be running AdBlock on your computer. It takes real money to run this site and to deliver the news, tips, and opinions you love to read.

If you wish to block the ads that pay for the creation of our content, we ask that you instead support TMO Directly, either with a $5 monthly recurring contribution, or a one-time donation of any amount of your choice. Thanks!

Subscribe with Paypal Donate with Paypal