The system does not provide an interface but the AVCastPicker component to switch output devices. Therefore, you can integrate AVCastPicker into your application for device switching. This component provides certain customization capabilities, ensuring that it aligns with the application's existing UI.
Reference