DeviceDiscoveryExtension
Stream media to a third-party device that a user selects in a system menu.
Overview
Use DeviceDiscoveryExtension (DDE) to discover third-party media receivers to which your app can stream AV content.
When a user invokes your app’s media-streaming UI, you can offer a third-party, local-network, or Bluetooth device as a streaming destination in a route picker view (AVRoutePickerView). The figure below illustrates actors in the discovery process. As depicted in the System section, your app’s device discovery extension loads when the view displays.
[Image]
Once the extension loads:
The extension runs in a system process and searches the local network and Bluetooth devices for a specific media receiver.
When the extension finds the device, it returns the device to the system, which displays it in the picker view as an available option.
The user makes a selection and the system passes the chosen device to the app, which can then stream media to the device.
Because DDE runs in a system sandbox, the extension doesn’t need to ask the user for local-network or Bluetooth permissions. The picker view displays discovered third-party devices and protocols in the same system menu as AirPlay, which provides a unified device-selection experience.
Topics
Essentials
Extension
Life cycle
Device information
DDDeviceDDDevice.CategoryDDDeviceStateDDDeviceCategoryToString(_:)DDDeviceStateToString(_:)DDDevice.ProtocolDDDeviceProtocolToString(_:)DDDeviceProtocolStringDDDeviceMediaPlaybackStateToString(_:)