I have a method that I use to automatically replay the last item in AVQueuePlayer's queue. The problem is, it doesn't actually do a replay when it's called.
Here's the method:
I've verified that the above method is called after the item in question has finished playing. Will someone familiar with AVQueuePlayer please tell me why my method isn't working?
Oh, perhaps I need to "pause" or "stop" first?
Edit: I set a breakpoint in the method and checked
and the debugger said the item was still in the queue.
Edit: All the media I'm using is local.
Here's the method:
Code:
-(void)doReplay:(BOOL)insertLastItem
{
if (insertLastItem) {
[self.queuePlayerinsertItem:lastItemafterItem:nil];
}
[self.queuePlayer seekToTime:kCMTimeZero];
[self.queuePlayer play];
}
I've verified that the above method is called after the item in question has finished playing. Will someone familiar with AVQueuePlayer please tell me why my method isn't working?
Oh, perhaps I need to "pause" or "stop" first?
Edit: I set a breakpoint in the method and checked
Code:
[self.queuePlayer items]
Edit: All the media I'm using is local.
Last edited: