gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 19:59:30 26 4
gpt4 key购买 nike

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com