BMPlayer
BMPlayer copied to clipboard
definition change not working
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
- [x] I have searched in existing issues but did not find the same one.
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.
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 Please create a pull request~ Thanks.