<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVRoutePickerView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVRoutePickerView"
  },
  "title" : "AVRoutePickerView"
}
-->

# AVRoutePickerView

A view that presents a list of nearby media receivers.

```
class AVRoutePickerView
```

## Overview

This view represents a button that users tap to stream audio/video content to a media receiver, such as a Mac or Apple TV.

![A screenshot of an AV route picker view that composes a button with text that says Choose output device on the left, and an icon of a computer screen next to a set-top box remote on the right.](images/com.apple.avkit/media-4084059@2x.png)

When the user taps the button, the system presents a popover that displays all of the nearby AirPlay devices that can receive and play back media. If your app prefers video content, the system displays video-capable devices higher in the list.

![A screenshot of a popover with a list of items. The top item is an iPad icon with a check mark to the right. Below that is the title Speakers and TVs with a list of six subitems. The first subitem says Third-party device, followed by AirPlay and Third-party protocol. The remaining subitems are Sunset Beach with an Apple TV icon on the left, Link with TV code with a globe icon on the left, and Show more.](images/com.apple.avkit/media-4084052@2x.png)

In iOS 16 and later, you can add devices to the list that implement custom protocols. For more information about displaying third-party routes, see <doc://com.apple.documentation/documentation/AVRouting>.

### Configure the button’s text, color, and media preference

The following code example creates the view alongside custom text:

```swift
HStack {
    Text("Choose output device")
        .font(.title)
        .frame(maxWidth: .infinity, alignment: .center)
        .fixedSize()
        .padding(.leading)

    if routeDetected {
        DevicePickerView() // See implementation below.
        .frame(width: 60, height: 60)
        .padding(.trailing)
    }
}
```

Your app configures the button’s color scheme and indicates whether your app prefers video content, as the following code demonstrates:

```swift
struct DevicePickerView: UIViewRepresentable {
    func makeUIView(context: Context) -> UIView {
        let routePickerView = AVRoutePickerView()

        // Configure the button's color.
        routePickerView.delegate = context.coordinator
        routePickerView.backgroundColor = UIColor.white
        routePickerView.tintColor = UIColor.black

        // Indicate whether your app prefers video content.
        routePickerView.prioritizesVideoDevices = true

        return routePickerView
```

## Topics

### Configuring the delegate

[`delegate`](/documentation/AVKit/AVRoutePickerView/delegate)

The delegate object for the route picker.

[`AVRoutePickerViewDelegate`](/documentation/AVKit/AVRoutePickerViewDelegate)

A protocol that defines the methods to adopt to respond to route picker view presentation events.

### Configuring the route picker view

[`activeTintColor`](/documentation/AVKit/AVRoutePickerView/activeTintColor)

The view’s tint color when AirPlay is active.

[`isRoutePickerButtonBordered`](/documentation/AVKit/AVRoutePickerView/isRoutePickerButtonBordered)

A Boolean value that indicates whether the route picker button has a border.

[`prioritizesVideoDevices`](/documentation/AVKit/AVRoutePickerView/prioritizesVideoDevices)

A Boolean value that indicates whether the route picker sorts video output devices to the top of the list.

[`routePickerButtonStyle`](/documentation/AVKit/AVRoutePickerView/routePickerButtonStyle)

The button style for the route picker.

[`AVRoutePickerViewButtonStyle`](/documentation/AVKit/AVRoutePickerViewButtonStyle)

Constants that define the button styles a route picker view supports.

[`routePickerButtonColor(for:)`](/documentation/AVKit/AVRoutePickerView/routePickerButtonColor(for:))

Returns the color of the picker button for the specified state.

[`setRoutePickerButtonColor(_:for:)`](/documentation/AVKit/AVRoutePickerView/setRoutePickerButtonColor(_:for:))

Sets the route picker button color for the specified state.

[`AVRoutePickerView.ButtonState`](/documentation/AVKit/AVRoutePickerView/ButtonState)

Constants that describe the available button states.

### Accessing the player

[`player`](/documentation/AVKit/AVRoutePickerView/player)

The player object to perform routing operations for.

### Setting a custom routing controller

[`customRoutingController`](/documentation/AVKit/AVRoutePickerView/customRoutingController)

A routing controller that enables connections to non-AirPlay devices.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)