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 “,” these chapters are available only to ; see “ ” for details.
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 6 and iOS 7,  on a Mac, and , plus how to  to an Apple TV. I even talk about making your Apple TV the source of an AirPlay stream, in .
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.
You can keep interlopers out of your TV using either the Onscreen Code option or a password. These options are quite different:
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).
To turn off a code or password, return to Settings > AirPlay and select None under the Security heading.
In iOS, AirPlay is supported by many apps. To activate it from within an app, tap the AirPlayicon 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.
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.
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.
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.
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.
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.
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.
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).
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.
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
.safariextz file (it’s probably in your Downloads folder). When asked by Safari if you want to install the extension, click Install.
Next, configure Media Center for your Apple TV:
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.
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!
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 Safari extension (also by Marc Hoyois) and the  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.
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.
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: |  |  |  |  |  |  |  |  |  |  |