Why is Bitmovin Player working on my tvOS simulator but not on my Apple TV device?

I’m trying to use Bitmovin on tvOS. It works in the tvOS simulator, but when I try to use it on an AppleTV device, playback doesn’t begin.

This is the code I’m using:

    private var bmPlayer: Player!
    func play(url: URL) {
        let view = UIView()
        view.frame = self.view.bounds
        self.view .addSubview(view)
        let config = PlayerConfig()
        config.key = "<redacted>"

        // Enable auto play
        config.playbackConfig.isAutoplayEnabled = true

        // Create player based on player configuration
        bmPlayer = PlayerFactory.create(playerConfig: config)

        // Create player view and pass the player instance to it
        let playerView = PlayerView(player: bmPlayer, frame: .zero)

        // Listen to player events
        bmPlayer.add(listener: self)

        playerView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
        playerView.frame = view.bounds


        let sourceConfig = SourceConfig(url: url, type: .progressive)
        bmPlayer.load(sourceConfig: sourceConfig)
1 Like

Hi @thomas.huertas , have you tried tried the bitmovin tvOS sample already? bitmovin-player-ios-samples/BasicPlaybackTV at main · bitmovin/bitmovin-player-ios-samples · GitHub.

If not, could you try this and check if you have the same issues? Also, could you provide the content URL for me to check?

Hi @matheus.cardoso , I forgot to register the Bundle ID with Bitmovin in my dashboard. I got everything to work now. Thank you.

1 Like