Getting AVPlayer for iOS 5 to display the last frame of the video when playback is completed instead of a black screen

I am making some changes to an iPad application written by someone else, and one of the things I need to fix is ​​that the video needs to continue showing the last frame when playback is complete, and not just the black screen.

On an iPad simulator using iOS 4.3, this is exactly what it does, but it's just black on iOS 5 (both on the simulator and on the device).

Any suggestions on the best way to achieve this to make it work for iOS 5? The code uses AVQueuePlayer .

+4
source share
1 answer

I ended up finding a solution:

 [player setActionAtItemEnd:AVPlayerActionAtItemEndPause]; 

I already tried this and refused it, because it didn’t work, but I think I made a mistake without installing it through the setter.

+7
source

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


All Articles