Add a "First" track selection mode
Created by: ToshB
I miss an additional TRACK_SELECTION_MODE_FIRST, which causes the mediacontroller to select the first audio track defined in the manifest, without any other prioritizing.
If this is too specific, an optional callback for writing my own track selection logic would also work.
I'm working on an application for video editors where the users can play back video files with multiple audio tracks. The tracks within a file are all configured with the same language, but has different content (imagine a sports event with commentator, reporter, audience). And they're all arranged/merged correctly in the first track in the manifest.
My problem is that I can't find a way to specify that I want the first audio track. Up to now I've been able to specify my default language (like 00EN - first english track) through setInitialMediaSettingsFor('audio'), but that requires knowing the language up front. When no audio track matches this name, it falls back to the configured trackSelectionMode, which basically ends up selecting a random track in my case.
I've tried switching language as soon as possible after starting playback, but this causes unnecessary interruptions in playback.