Skip to content

Add preferred mime type(s) to DefaultTrackSelector parameters #8320

@ybai001

Description

@ybai001

I'd like to implement a customized TrackSelector. My situations are

  1. I don't want to change any code of ExoPlayer core library so that I'll not modify DefaultTrackSelector directly;
  2. I know I can do some kinds of customization via setParameter API.

trackSelector.setParameters( trackSelector .buildUponParameters() .setMaxVideoSizeSd() .setPreferredAudioLanguage("deu"));

But Current APIs can't satisfy my requirement. For example, I'd like to always set higher priority for Dolby Digital plus track than AAC audio track. It seems that current interface can't support it.

According to ExoPlayer official documentation (https://exoplayer.dev/customization.html),

TrackSelector – Implementing a custom TrackSelector allows an app developer to change the way in which tracks exposed by a MediaSource are selected for consumption by each of the available Renderers.

My first feeling is I need to copy all files under "library\core\src\main\java\com\google\android\exoplayer2\trackselection" folder into my application layer and then do some modification. Do you have any suggestion for this? Is there a better solution?

Thank you very much in advance.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions