我的代码:
AVQueuePlayer *player = ...;
AVPlayerViewController *controller = [[AVPlayerViewController alloc] init];
[vc presentViewController:controller animated:YES completion:nil];
controller.player = player;
controller.allowsPictureInPicturePlayback = NO;
[player play];
AVQueuePlayer
类似于AVPlayer
,但支持多个项目。
问题是AVPlayerViewController
有“下一个/上一个”按钮,它们不工作。
1条答案
按热度按时间epfja78i1#
并非所有媒体都能够快进/跳过或倒带。
AVPlayer
不允许您覆盖该功能。要检查介质是否能够快进或快退,请参阅
AVPlayerItem
中的canPlayFastForward
和canPlayFastReverse
的值。如果你真的想覆盖Next/Prev按钮,我想你唯一的办法就是定制一个
AVPlayerViewController
。