iOS 10 - AVPlayer shows black screen when playing video

You need to retain your instance of AVPlayerItem i.e. as a property or an instance variable. The reference to the movie player is lost if you do not retain it. Even some time this rubish happens in ARC as well.Please make it property.


The solutions on this page did not work for me.

I found another solution to this problem. In my case the video was being played in black but the sound was ok.

I discovered that changing the time slider to scrub the video would make the video appear.

So, my solution was to make the video go the the last frame, then to the first before playing:

Float64 duration = [self.player duration];    
[self.player goToTime:duration];
[self.player goToTime:0.0f];