-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
I'd like to implement a customized TrackSelector. My situations are
- I don't want to change any code of ExoPlayer core library so that I'll not modify DefaultTrackSelector directly;
- 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.