iOS SDK migrate v2 to v3 custom UI

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
    }

Hi @dev3,

From what I can see all you have to do is to change from BMPBitmovinPlayerView to PlayerView.

Details can be found in our v2 to v3 Migration Guide.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.