Exoplayer: show_buffering IntDef values are wrongly updated in a commit.

Created on 23 Nov 2018  路  3Comments  路  Source: google/ExoPlayer

Long story short, I think this commit has made the IntDef wrong ...

check this

Screenshot below:

  • SHOW_BUFFERING_ALWAYS is changed from 1 to 2.
  • SHOW_BUFFERING_WHEN_PLAYING is changed from 2 to 1.

screen shot 2018-11-23 at 17 02 23

bug

Most helpful comment

Ah, thanks for explaining. We'll fix that.

All 3 comments

Not sure this makes it wrong. The idea of IntDefs is to use constants instead of number literals when working with these states. So changing the numbers shouldn't make a difference. Can you explain why this is a problem for your code?

@tonihei Actually, the real issue is when you set this from xml layout with these enum: link to attrs.xml, it will be recognized here: link to PlayerView.java.

So setting "when_playing" in xml will result in the value to be 2, and in PlayerView.java, it will be compared to "ALWAYS" so this is the wrong behaviour: link to usage

Ah, thanks for explaining. We'll fix that.

Was this page helpful?
0 / 5 - 0 ratings