Product
Player
Question
This below is v2 code, I would like to know how can I migrate to v3, thx.
func addPlayerViewIfNeeded() {
guard let player = self.player else { return }
if playerView == nil {
let playerView = BMPBitmovinPlayerView(player: player, frame: .zero)
playerView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
playerView.frame = view.bounds
playerView.addGestureRecognizer(tapGesture)
view.addSubview(playerView)
view.sendSubviewToBack(playerView)
self.playerView = playerView
}
playerView?.player = player
}