要设置ZFPlayerControlView不自动播放,可以通过以下步骤实现:

  1. 找到ZFPlayerControlView的实例对象,一般是在Controller中创建。
  2. 找到ZFPlayerControlView的player属性,即ZFPlayer对象。
  3. 设置ZFPlayer对象的shouldAutoPlay属性为NO,表示不自动播放。

具体代码如下所示:

// 创建ZFPlayerControlView对象
ZFPlayerControlView *controlView = [[ZFPlayerControlView alloc] init];

// 找到ZFPlayer对象
ZFPlayer *player = controlView.player;

// 设置不自动播放
player.shouldAutoPlay = NO;

这样设置之后,当你调用ZFPlayerControlView的play方法时,视频就不会自动播放了,需要手动点击播放按钮才能开始播放。

ZFPlayerControlView 设置不自动播放

原文地址: https://www.cveoy.top/t/topic/iCF3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录