Airplay with AVQueuePlayer has spaces

My app uses AVQueuePlayer to show video clips back. When testing on my AppleTV, it seems that when I switch to the next video in the queue, there is a short period of time when the Apple TV β€œtakes” the screen and the home screen of the Apple TV. Is there a way to prevent this gap, even a black screen or a progress bar will be the best experience.

+4
source share
1 answer

I had the same problem and was alarmed when I saw that no one had yet found an answer.

The solution I came up with is using multiple display support added in iOS 5. There are some useful links in this article:

https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/WindowAndScreenGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40012555-CH1-SW1

http://blog.redfin.com/devblog/2012/05/creating_a_dual-screen_airplay_experience_for_ios_and_apple_tv.html#.UjCe5mRATZY

The application I'm developing will basically look for the availability of an external screen. If he finds one, he will play the video on the view controller, which I provide for this external screen. This viewcontroller may have a black background so that any pause between the videos looks natural and no longer appears on the Apple TV screen for a moment.

+1
source

Source: https://habr.com/ru/post/1497547/


All Articles