Skip to content

Cannot select any other than 1st audio/subtitle track in StyledPlayerView (regression) #9649

Closed

Description

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:

  1. Open test5.mkv
  2. Change audio track from "Auto" to "Stereo" - it plays
  3. 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

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions