Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player在scrollview中,stopWhileNotVisible=false之后的addPlayerViewToSmallFloatView能否有外界控制? #1417

Open
gongqiuwei opened this issue Dec 11, 2023 · 0 comments

Comments

@gongqiuwei
Copy link

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,自己控制播放的暂停,但是滑动后会出现小窗播放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant