ios AVPlayerViewController下一个/上一个按钮不起作用?

z4iuyo4d  于 2023-05-19  发布在  iOS
关注(0)|答案(1)|浏览(105)

我的代码:

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有“下一个/上一个”按钮,它们不工作。

epfja78i

epfja78i1#

并非所有媒体都能够快进/跳过或倒带。AVPlayer不允许您覆盖该功能。
要检查介质是否能够快进或快退,请参阅AVPlayerItem中的canPlayFastForwardcanPlayFastReverse的值。
如果你真的想覆盖Next/Prev按钮,我想你唯一的办法就是定制一个AVPlayerViewController

相关问题