Closed
Description
openedon Nov 4, 2021
I'm migrating from ExoPlayer 2.15.1 to 2.16.0. When I select any audio or subtitle track (in StyledPlayerView
), other than the first one, there is no audio heard or subtitle visible. I can replicate in something like this:
public class MainActivity extends AppCompatActivity {
private StyledPlayerView playerView;
private ExoPlayer player;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
playerView = findViewById(R.id.video_view);
MediaItem.Builder mediaItemBuilder = new MediaItem.Builder()
.setUri(getIntent().getData())
.setMimeType(getIntent().getType());
player = new ExoPlayer.Builder(this)
.build();
playerView.setPlayer(player);
player.setMediaItem(mediaItemBuilder.build());
player.prepare();
}
}
Video used for testing: https://github.com/ietf-wg-cellar/matroska-test-files/blob/master/test_files/test5.mkv
Steps:
- Open test5.mkv
- Change audio track from "Auto" to "Stereo" - it plays
- Change audio track to "English, Mono" - it doesn't play
It's the same with subtitles. Only the first one (English) are visible. It works fine when using ExoPlayer 2.15.1.
- ExoPlayer version number: 2.16.0
- Android version: Android 10
- Android device: OnePlus 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment