Provide an API for designating an app using AVPlayer/AVQueuePlayer as "audio-only"

Originator:ricardopereira.eu
Number:rdar://42966681 Date Originated:06-Aug-2018 02:34 PM
Status:Closed Resolved:Yes
Product:iOS + SDK Product Version:11.4.1
Classification:Enhancement Reproducible:Always
 
Summary:
Regarding the bug report number 42881405, please provide an API for designating an app using AVPlayer/AVQueuePlayer as "audio-only" (with the ability to stream audio with good performance).

Steps to Reproduce:
Use an AVPlayer to stream just audio to an Apple TV.

Expected Results:
Maybe checking if the `MPMediaItemPropertyMediaType` is of type MPNowPlayingInfoMediaType.audio could be a solution.

Actual Results:
I need to set `allowsExternalPlayback` property of an AVPlayer/AVQueuePlayer to `false` to disallow the routing of video playback to AirPlay, and (as a side-effect) allows the pure audio playback.

Version:
11.4.1

Notes:

Comments

Apple Developer Relations

I still didn’t get an answer for this: If you set allowsExternalPlayback to false, you should be getting buffered audio (not real-time audio). This should work pretty well. Why do you want to have allowsExternalPlayback set to true and have audio playback? allowsExternalPlayback controls URL flinging, and we think using URL flinging for audio only assets doesn’t give any benefit to developers, especially now that we have buffered audio. Please provide your response or results by updating your bug report. If uploading files, please compress first.

By ricardopereira.eu at Aug. 19, 2018, 10:42 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!