Apple TV 4K
My Question or Issue
If the current audio output route is an AirPlay speaker, then after a sleep/wake up of the device the audio output is on TV speaker although the AirPlay speaker is still checked on the audio output route setting.
Steps to reproduce
1. Turn on your Apple TV
2. Choose as audio output your AirPlay speaker
3. Open Spotify and play a music
4. Notice that the sound appear on your AirPlay speaker
5. Put your Apple TV on sleep mode
6. Wake up your Apple TV
7. Resume your music with the Play button
8. Notice that the sound appear on your TV speakers and not on your AirPlay speaker
9. Open the Apple TV Audio output setting an notice that your AirPlay speaker is still checked.
10. To fix the issue the only way is to uncheck and check again your Airplay Speaker on this window.
Maybe this issue can be usefull: https://openradar.appspot.com/44875522
This issue seems to be related to Apple SDK and specialy with AVAudioSession, you can reproduce the same issue with the YouTube Apple TV app.