Open gongqiuwei opened 7 months ago
scrollView.zf_playerDidDisappearInScrollView = ^(NSIndexPath * _Nonnull indexPath) { @zf_strongify(self) if (self.isFullScreen) return; if (self.zf_playerDidDisappearInScrollView) self.zf_playerDidDisappearInScrollView(indexPath); if ([self.controlView respondsToSelector:@selector(playerDidDisappearInScrollView:)]) { [self.controlView playerDidDisappearInScrollView:self]; }
if (self.stopWhileNotVisible) { /// stop playing if (self.containerType == ZFPlayerContainerTypeView) { [self stopCurrentPlayingView]; } else if (self.containerType == ZFPlayerContainerTypeCell) { [self stopCurrentPlayingCell]; } } else { /// add to window if (!self.isSmallFloatViewShow) { [self addPlayerViewToSmallFloatView]; } } };
这里,是否addPlayerViewToSmallFloatView交由外界控制?
背景需求: 滑动scrollView只是暂停播放器,不是停止,因此stopWhileNotVisible=false,自己控制播放的暂停,但是滑动后会出现小窗播放
scrollView.zf_playerDidDisappearInScrollView = ^(NSIndexPath * _Nonnull indexPath) { @zf_strongify(self) if (self.isFullScreen) return; if (self.zf_playerDidDisappearInScrollView) self.zf_playerDidDisappearInScrollView(indexPath); if ([self.controlView respondsToSelector:@selector(playerDidDisappearInScrollView:)]) { [self.controlView playerDidDisappearInScrollView:self]; }
这里,是否addPlayerViewToSmallFloatView交由外界控制?
背景需求: 滑动scrollView只是暂停播放器,不是停止,因此stopWhileNotVisible=false,自己控制播放的暂停,但是滑动后会出现小窗播放