这是初始化AVQueuePlayer的代码。
AVQueuePlayer *queuePlayer = [[AVQueuePlayer alloc] init];
queuePlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
if ([queuePlayer respondsToSelector:@selector(automaticallyWaitsToMinimizeStalling)])
queuePlayer.automaticallyWaitsToMinimizeStalling = NO;
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:url];
if (playerItem)
[queuePlayer insertItem:playerItem afterItem:nil];
if ([queuePlayer respondsToSelector:@selector(playImmediatelyAtRate:)])
[queuePlayer playImmediatelyAtRate:1.0];
else [queuePlayer play];