This article originally appeared in TidBITS on 2013-11-25 at 12:37 p.m.
The permanent URL for this article is: http://tidbits.com/article/14328
Include images: Off

Take Control of Apple TV, Chapter 5: Master AirPlay

by Josh Centers

This article is a pre-release chapter in the upcoming “Take Control of Apple TV,” by Josh Centers, scheduled for public release in January 2014. Apart from “Chapter 1: Introducing Apple TV [1],” these chapters are available only to TidBITS members [2]; see “‘Take Control of Apple TV’ Streaming in TidBITS [3]” for details.


Master AirPlay

With AirPlay, you can play audio and video content from your Mac or iOS device on your Apple TV. You can also mirror your entire screen to the Apple TV, so whatever you see and hear on your device, you also see and hear through the Apple TV. And, in 10.9 Mavericks you can turn the TV attached to your Apple TV into another display for your Mac, just like any other external display. In fact, AirPlay is such a great feature that I’ve decided to use it as a verb—it’s more elegant to write “you can AirPlay a video to your Apple TV” than “you can stream a video to your Apple TV using AirPlay.”

In this chapter, I show you how to AirPlay from iOS [4] 6 and iOS 7, AirPlay from iTunes 11 [5] on a Mac, and Mirror from a Mac [6], plus how to Extend a Mavericks Desktop [7] to an Apple TV. I even talk about making your Apple TV the source of an AirPlay stream, in AirPlay from an Apple TV [8].

The Two AirPlays

In practice, AirPlay has two primary forms: content streaming and display mirroring. With content, AirPlay streams media directly from a single app, while AirPlay Mirroring streams all audio and video from an entire device, so what you see and hear on the Apple TV is exactly what you see and hear on the device. In 10.9 Mavericks, AirPlay Mirroring is called AirPlay Display.

Lock Down AirPlay

AirPlay is great, but anyone connected to your Wi-Fi network can AirPlay to your Apple TV. AirPlay always takes precedence over whatever else is playing, so if you’re trying to watch a movie, a merry prankster could butt in with a music video [9].

You can keep interlopers out of your TV using either the Onscreen Code option or a password. These options are quite different:

  • Code: With a code, when you initiate AirPlay on your device, a 4-digit code appears on your TV screen, where everyone else on the couch can see it too — but not your neighbors in the next apartment. You enter the code on your device, and playback begins. The code is different each time.
  • Password: With a password, when you AirPlay to your Apple TV, you are asked to enter the password. The password remains the same each time; it’s whatever you’ve set up, so it keeps out everyone who doesn’t know it.

To enable a code or password, navigate to Settings > AirPlay, and scroll down to the Security heading. Select Onscreen Code or Password and enter one when prompted.

Next time you AirPlay to the Apple TV, you’ll be prompted to enter either the code or the password, depending on which you chose. The code appears on the TV screen (Figure 1).

[image link]

Figure 1: An AirPlay Code keeps the neighbors from sending media to your Apple TV via AirPlay, but makes it easy for friends and family to beam their content to the big screen.

To turn off a code or password, return to Settings > AirPlay and select None under the Security heading.

AirPlay from iOS

In iOS, AirPlay is supported by many apps. To activate it from within an app, tap the AirPlay [image link] icon and select your Apple TV from the list (Figure 2). You can adjust the volume on the iOS device as you would normally (volume buttons, Control Center, etc.) and the volume change will be reflected on your Apple TV.

[image link]

Figure 2: Activate AirPlay by tapping the AirPlay icon in any app, like in the iOS 6 Music app above. In iOS 7, Apple has removed the AirPlay button from many of its apps,opting instead to centralize AirPlay access in Control Center.

AirPlay remains active in every app that supports it until you turn it off. So if you AirPlay songs from the Music app, and then switch to the Podcasts app and start playing a podcast, that audio will also play through your Apple TV. To turn AirPlay off, tap the AirPlay icon again, then select your device from the popover.

You can also activate or deactivate AirPlay from the multitasking bar in iOS 6 or the Control Center in iOS 7. Here’s how.

Activate AirPlay from the Multitasking Bar in iOS 6:
  1. Double-press the Home button to bring up the multitasking bar. Or if you’re using an iPad and have enabled Multitasking Gestures, swipe up with four fingers.
  2. Slide the multitasking bar to the right.
  3. Tap the AirPlay ![ button.
  4. Select your Apple TV from the popover (Figure 3). Flip the switch if you want to turn AirPlay Mirroring on on off.
[image link]

Figure 3: To activate AirPlay in iOS 6, bring up the multitasking bar and swipe it to the right to reveal the AirPlay button.

Audio or video that was playing on your device now plays on your Apple TV instead. Or, if you switched on mirroring, the entire screen and audio from your device is duplicated on your Apple TV.

Activate AirPlay from Control Center in iOS 7:
  1. Bring up Control Center by placing your finger off the bottom of the display and swiping up.
  2. Tap the AirPlay button (Figure 4).
    [image link]

    Figure 4: In iOS 7, AirPlay options live in Control Center. Slide your finger up from beneath the bottom of the screen to pull up Control Center.

  3. Select your Apple TV from the menu. Flip the Mirroring switch if you want to turn AirPlay Mirroring on or off.

Media that was playing on your device now plays on your Apple TV instead. Or, if you turned on mirroring, the entire screen and audio from your device is duplicated on your Apple TV.

AirPlay from iTunes 11

Unfortunately, few third-party Mac apps support AirPlay natively, but many of Apple’s apps support it, including iTunes, iMovie, iPhoto, and Aperture. For example, to send audio or video from iTunes to a single device, click the AirPlay icon near the top of the window, then select your Apple TV from the popover (Figure 5). The icon turns blue to indicate that AirPlay is active. To turn AirPlay off, select your computer from the popover.

[image link]

Figure 5: In iTunes 11, sending audio or video to your Apple TV is as simple as clicking the AirPlay icon and selecting your Apple TV from the list.

You can also turn AirPlay on or off while watching a video by clicking the AirPlay icon in the video controls. Unfortunately, some videos purchased from iTunes disable AirPlay (but you can work around this by mirroring your display).

For more on viewing photos with AirPlay, see Chapter 8, Watch Photos & Home Movies.

Mirror from a Mac

10.8 Mountain Lion and 10.9 Mavericks can mirror audio and video to your Apple TV — that is, whatever you see or hear on your Mac is duplicated on the Apple TV. This enables you to give presentations, view content not available on Apple TV or iOS, or even play Mac games — though you’ll have to deal with a little lag.

To turn on mirroring, click the AirPlay icon in the menu bar and choose your Apple TV. The icon turns blue, indicating that AirPlay is active. Alternatively, you can turn AirPlay on or off in the Displays pane of System Preferences.

Note: If you don’t see the AirPlay icon in the menu bar, open the Displays preference pane, click Display, and select “Show mirroring options in the menu bar when available.” If you can’t find this checkbox, your Mac may not have the necessary hardware to drive mirroring; read this Apple support article [10] for details.

Extend a Mavericks Desktop

In Mavericks, by default, AirPlay Display mirrors your Desktop, but you can instead “extend” your Desktop right onto your TV screen through your Apple TV. You might do this to display content on the TV while you continue to work on your Mac. To accomplish this, first click the AirPlay icon in the menu bar and choose Apple TV. Second, open the AirPlay menu again and choose Extend Desktop (Figure 6).

[image link]

Figure 6: The AirPlay menu in the menu bar gives you quick access to all of your AirPlay Mirroring and AirPlay Display options.

Your TV now acts as an additional monitor — if you’ve never used a Mac with two displays before, note that you can move your pointer and drag your windows between the two screens!

To see how your monitors are arranged or to change their virtual arrangement, open the Displays pane of System Preferences and click Arrangement. In the Arrangement view, you can drag the screens to adjust their positions, for example, you might want your laptop to be “below” the Apple TV screen so that when you mouse off the bottom of the TV screen, your pointer appears at the top of your laptop screen.

No Sound When AirPlay Mirroring?

Sometimes when you activate AirPlay Mirroring, the audio stays on your Mac instead of jumping to your Apple TV. When that happens, here’s what to do:

  1. Turn off AirPlay Mirroring.
  2. Open Terminal (from /Applications/Utilities).
  3. At the command prompt, type: sudo killall coreaudiod
  4. Press Return on the keyboard, and enter your administrator password when prompted.
  5. Turn on AirPlay Mirroring.

Your audio should now play through the TV.

AirPlay Video from Safari

Want to send a video from your Web browser to the Apple TV? Instead of mirroring your entire display, which can cause choppy video, try the Media Center Safari extension by Marc Hoyois. Media Center can AirPlay HTML 5 videos.

To begin, visit the Media Center [11] page, download the extension, and then double-click the downloaded .safariextz file (it’s probably in your Downloads folder). When asked by Safari if you want to install the extension, click Install.

Note: Media Center works with an Apple TV whose AirPlay reception is protected with a password, but not an onscreen code. If you’ve set up an onscreen code, you must turn it off before Media Center can stream to your Apple TV. See Lock Down AirPlay [12], earlier in this chapter, for help.

Next, configure Media Center for your Apple TV:

  1. On your Apple TV, navigate to Settings > General > About, and look at the IP Address field. You should see a number like 10.0.1.41 or 192.168.4.12. That’s the IP address of your Apple TV. Keep it showing on your TV screen or write it down on a slip of paper.
  2. In Safari, choose Safari > Preferences (Command-,).
  3. Click the Extensions button in the toolbar.
  4. In the left column, select Media Center.
  5. Scroll to the bottom of the right-hand pane, until you see the AirPlay Device Hostname field. Enter the Apple TV’s IP address from Step 1 in that field (Figure 7).
    Figure 7: Tell the Media Center Safari extension how to find your Apple TV by telling it the Apple TV’s IP address (hostname).

    Figure 7: Tell the Media Center Safari extension how to find your Apple TV by telling it the Apple TV’s IP address (hostname).

  6. In the next field down, enter your Apple TV’s AirPlay password, if it has one. (If you forget to input the password here, you’ll be presented with an undismissable password prompt when you try to AirPlay a video, requiring you to quit Safari to continue.)

With Media Center installed and configured, try watching an HTML 5 video. Control-click the video and choose Send via AirPlay (Figure 8). The video begins playing on your Apple TV!

[image link]

Figure 8: Once Media Center is configured, you can AirPlay any HTML 5 video with a couple of clicks.

To work around the fact that Flash and Silverlight videos aren’t supported, or if you are having trouble with YouTube videos, you may need to install the ClickToPlugin [13] Safari extension (also by Marc Hoyois) and the YouTube5 [14] Safari extension (donationware by Vertical Forest). These extensions cause many video sites to fall back to the necessary HTML5 video format instead of Flash or Silverlight. Open Safari’s preferences and configure them in a similar manner to how you configured Media Center.

AirPlay from an Apple TV

Your Apple TV isn’t just an AirPlay receiver; it’s also an AirPlay audio transmitter. It can send audio to AirPlay speakers, an AirPort Express base station (with a connected AirPlay speaker), or even to another Apple TV!

You could use this capability, for example, to supplement lousy TV speakers without fussing with a receiver or shelling out for a soundbar. Or, you can keep your Apple TV’s overall volume lower by putting an AirPlay speaker next to the couch.

It’s easy to set up. On the Apple TV, open Settings > AirPlay, scroll down to Speakers, and select your desired speaker (Figure 9). Unfortunately, it’s annoying to flip back and forth between different speakers, making it annoying, for instance, to play iTunes Radio music through different speakers than you want to use when watching TV.

[image link]

Figure 9: You can send audio from the Apple TV to any AirPlay receiver — even another Apple TV!

I’ll cover adjusting the volume in later chapters, as it’s a bit different for movies and music, but regardless, you can access the AirPlay volume control by holding down the Select button on the Apple Remote while watching a video or listening to audio.

Read More: About [15] | Chapter 1 [16] | Chapter 2 [17] | Chapter 3 [18] | Chapter 4 [19] | Chapter 5 [20] | Chapter 6 [21] | Chapter 7 [22] | Chapter 8 [23] | Chapter 9 [24] | Chapter 10 [25] | Chapter 11 [26]

[1]: http://tidbits.com/article/14269
[2]: http://tidbits.com/member_benefits.html
[3]: http://tidbits.com/article/14266
[4]: #AirPlayiniOS
[5]: #AirPlayfromiTunes11⁠
[6]: #MirrorfromaMac
[7]: #ExtendaMavericksDesktop
[8]: #AirPlayfromanAppleTV
[9]: http://www.youtube.com/watch?v=oHg5SJYRHA0
[10]: http://support.apple.com/kb/HT5404
[11]: http://hoyois.github.io/safariextensions/mediacenter/
[12]: #LockDownAirPlay
[13]: http://hoyois.github.io/safariextensions/clicktoplugin/
[14]: http://www.verticalforest.com/youtube5-extension/
[15]: http://tidbits.com/article/14266
[16]: http://tidbits.com/article/14269
[17]: http://tidbits.com/article/14270
[18]: http://tidbits.com/article/14291
[19]: http://tidbits.com/article/14303
[20]: http://tidbits.com/article/14328
[21]: http://tidbits.com/article/14361
[22]: http://tidbits.com/article/14383
[23]: http://tidbits.com/article/14407
[24]: http://tidbits.com/article/14430
[25]: http://tidbits.com/article/14449
[26]: http://tidbits.com/article/14473