[Player][Android TV] Changing video quality makes player view briefly shrinks

Hi everyone,

Recently, I encountered an issue while upgrading the Bitmovin Player SDK to its latest version on my Android TV project. After upgrading to version 3.47.0, the player was functioning properly until I began testing the video quality.

Whenever I change the video quality, the player view momentarily shrinks before returning to its original size.

player.source?.setVideoQuality({VideoQuality.id})

I tested the Bitmovin sample code and observed the same behaviour. Here’s the link to the sample project on Github.

In MainActivity.kt, I initialize the player and load the source. Once the source is loaded, I create a function that continuously changes the video quality.

player = Player.create(
            this,
            PlayerConfig(
                playbackConfig = PlaybackConfig(isAutoplayEnabled = true)
            ),
            AnalyticsConfig(analyticsKey)
        )

player.load(SourceConfig(sourceURL, SourceType.Dash))

// change video quality when source loaded
player.on<SourceEvent.Loaded>{
      changeVideoQuality()
}

changeVideoQuality()

     /*
     * This function iterates through all available video qualities
     * and sets the player source with the new quality after a 7-second delay.
     */
    private fun changeVideoQuality(){
        CoroutineScope(Dispatchers.Main).launch {
            player.source?.availableVideoQualities?.forEach {
                delay(7000)
                Toast.makeText(this@MainActivity, "set video quality = ${it.height}x${it.width}\"", Toast.LENGTH_SHORT).show()
                player.source?.setVideoQuality(it.id)
             }
             changeVideoQuality()
         }
     }

Now if you launch the app, you will see the player view briefly shrinks before returning to its original size when setVideoQuality() is called. You can find the video demo here

This problem happens on Bitmovin player versions 3.46.0 and 3.47.0

Thank you in advance for your time!

1 Like

Could it be related to the recent ExoPlayer version 1.19.1 upgrade since it has been introduced in Bitmovin Player Android SDK version 3.46.0?

Hello @puthea.mam,
thanks for the detailed report. It seems like the player in version 3.46.0 + emits an additional VideoSizeChanged event which causes the PlayerView to resize.

We are tracking the issue internally and I will update you here once we have any progress/solution.

As @admin.vodfactory pointed out this is likely related to the underlying ExoPlayer update.

Best regards,
Lukas

2 Likes

According to the Bitmovin Player Android SDK release notes, this issue seems fixed on version 3.49.0.

1 Like

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