feat: add language selector to audio player
This commit is contained in:
parent
051b64cd17
commit
079f78a339
12 changed files with 241 additions and 98 deletions
|
|
@ -188,6 +188,14 @@ public final class ListHelper {
|
|||
videoOnlyStreams, ascendingOrder, preferVideoOnlyStreams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the list of audio streams and return a list with the preferred stream for
|
||||
* each audio track. Streams are sorted with the preferred language in the first position.
|
||||
*
|
||||
* @param context the context to search for the track to give preference
|
||||
* @param audioStreams the list of audio streams
|
||||
* @return the sorted, filtered list
|
||||
*/
|
||||
public static List<AudioStream> getFilteredAudioStreams(
|
||||
@NonNull final Context context,
|
||||
@Nullable final List<AudioStream> audioStreams) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue