Мне нужно создать что-то вроде бесконечного цикла в моем AVQueuePlayer
. В частности, я хочу воспроизвести все NSArray
из AVPlayerItem
, когда закончится воспроизведение последнего компонента.
Должен признать, что на самом деле я понятия не имею, как этого добиться, и надеюсь, что вы дадите мне несколько подсказок.
-(void) playVideoAtIndex:(NSInteger)index{ [self performSelector:@selector(setObservationInfo)]; currentIndex = index; AVPlayerItem *videoItem = [AVPlayerItem playerItemWithURL:[NSURL fileURLWithPath:[arrVideoList objectAtIndex:index]]]; }
где нужно проверить,if (currentIndex < [arrVideoList count]-1) { currentIndex++; } else { currentIndex = 0; } [self playVideoAtIndex:currentIndex];
- person Dhruv   schedule 22.06.2012