嗨 friend 们 我正在使用 AVPlayer,但在其中我想连续重复播放 .mov 文件。所以我想使用eekToTime,但无法得到正确的想法,所以请任何人告诉我怎么做?
最佳答案
player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerItemDidReachEnd:) name:AVPlayerItemDidPlayToEndTimeNotification object:[player currentItem]];
- (void)playerItemDidReachEnd:(NSNotification *)notification{
AVPlayerItem *p = [notification object];
[p seekToTime:kCMTimeZero];
}
关于iphone - 我们怎样才能使播放列表在AVPlayer中连续重复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5856391/