BMPlayer icon indicating copy to clipboard operation
BMPlayer copied to clipboard

definition change not working

Open SirComet opened this issue 4 years ago • 2 comments

Check List

Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

BMPlayer version

Installed with

  • [ ] Carthage
  • [x] Cocoapods

Issue Description

What

[Tell us about the issue]

Reproduce

When launching the demo app, I set two different videos in definitions, but when I try to change them in the player dropdown works, but the button cannot be tapped.

Other Comment

I had been using it for a while and issue happened with new screens.

SirComet avatar Apr 27 '20 22:04 SirComet

In my Opinion, the definition button is on topWrapperView [L:530, @BMPlayerControlView.swift]. When the definition button open, the childView(definition button) is over the parentView(topWrapperView) My solution is override customizeUIComponents(), and set button on mainMaskView.

class MyPlayerControlView: BMPlayerControlView {
    override func customizeUIComponents() {
        // remove origin binding
        chooseDefinitionView.removeFromSuperview()
        // add on mainMask
        self.mainMaskView.addSubview(chooseDefinitionView)
        // use 're'makeConstraints,
        chooseDefinitionView.snp.remakeConstraints { [unowned self](make) in
            make.right.equalToSuperview().offset(-20)
            make.top.equalTo(self.titleLabel.snp.top).offset(-4)
            make.width.equalTo(60)
            make.height.equalTo(30)
        }
    }
} 

Niien avatar Aug 26 '20 03:08 Niien

@Niien Please create a pull request~ Thanks.

BrikerMan avatar Aug 26 '20 03:08 BrikerMan