iphone - 我们怎样才能使播放列表在AVPlayer中连续重复

标签 iphone avplayer

嗨 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/

相关文章:

iphone - cellForRowAtIndexPath : being called immediately while numberOfRowsInSection: is not called

iOS AVPlayer 无法播放

ios - 如何在 swift 3 中将滑动手势添加到 AVPlayer

ios - 从存档构建时 CADisplayLink 断断续续

iphone - 创建像 iPhone 一样的照片库,但 UIImage 点击事件处理程序不起作用

iPhone SDK : UIBarButtonItem not refreshing after Memory warning

swift - 如何呈现类似于 MFMailComposeViewController 的 UIViewController

iphone - 如何检查 zip 文件是否在 IOS 中受密码保护?

ios - 销毁 Controller 后恢复 avplayer

ios - 我如何继承 AVPlayer?