Question

I have an app that shows list of movies in a table view. When I play them one after another on device it works just great. But when I switch to Apple TV over AirPlay it doesn't work anymore. It play's the first video on ATV ok but after a switch to the next video the screen on ATV start blinking/flickering and after a few seconds it falls back playing on a device. I am using MPMoviePlayerController for playing stream videos.

I also found out that if previous video finished playing over AirPlay it tries to start the next one over AirPlay also. Is this intended behaviour?

Is this kind a related with property allowsAirPlay?

Was it helpful?

Solution

I think I've found a solution. Before you switch playing another video you should stop the previous one:

[self.moviePlayer stop];

This is not needed if you are not playing via AirPlay cos the next video will automatically stop previous one by nature - you can not play two videos at once.

But If you do play video over AirPlay you need to stop previous one first and than play the next one.

This solution works for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top