Merge pull request 'Fix android build' (#7) from volodymyr/fix-android-build into feat/shaka

Reviewed-on: #7
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
This commit is contained in:
Ivan Malison 2024-10-14 07:01:12 -06:00
commit bd64379837

View File

@ -533,12 +533,21 @@ public class ReactExoplayerView extends FrameLayout implements
builder.setSingleChoiceItems(speedOptions, selectedSpeedIndex, (dialog, which) -> {
selectedSpeedIndex = which;
float speed = switch (which) {
case 0 -> 0.5f;
case 2 -> 1.5f;
case 3 -> 2.0f;
default -> 1.0f;
};
float speed;
switch (which) {
case 0:
speed = 0.5f;
break;
case 1:
speed = 1.0f;
break;
case 2:
speed = 1.5f;
break;
default:
speed = 1.0f;
break;
}
setRateModifier(speed);
});
builder.show();