Repeat AVPlayerItem in AVQueuePlayer

I am using AVQueuePlayer to play my list of videos. I want to play one video continuously until I call the second video. Now, when Video1 is playing, and when it ends, playback of video2 is called, which I do not like.

Secondly, there is a delay between the two videos. Is there a way to smoothly transition from 1 video to another?

+4
source share
1 answer

Regarding your first question: set the property AVQueuePlayer actionAtItemEndto AVPlayerActionAtItemEndNone. Then register for AVPlayerItemDidPlayToEndTimeNotificationand inside the function that processes this notification call [player seekToTime:kCMTimeZero], which plays your current video from the very beginning.
Second question: you can also take care of this case inside the specified function.

+4
source

All Articles