ExoPlayer is given an HLS master playlist and it downloads it.
The next step seems to always be to download the very first media playlist in this master playlist.
I am referring to the code in DefaultHlsPlaylistTracker.onLoadCompleted() starting with:
primaryMediaPlaylistUrl = masterPlaylist.variants.get(0).url;
Code seems to await for this download to complete and only then starts downloading the "real" media playlists corresponding to the variant selected by the ABR algorithm. It does not look like this initial playlist is used (at least it is not used for downloading media segments).
I checked with RFC-8216 and it looks like the only special meaning which this first #EXT-X-STREAM-INF URL has is being a default for systems which do not support multiple #EXT-X-STREAM-INF tags, which is not the case with ExoPlayer.
While in general downloading and discarding this playlist does not change the player behavior, when media playlist is long this additional download and processing may be quite "costly".
So the question is why to use variants.get(0) (and not start directly from the playlist selected by the ABR algorithm)?
ExoPlayer is given an HLS master playlist and it downloads it.
The next step seems to always be to download the very first media playlist in this master playlist.
I am referring to the code in DefaultHlsPlaylistTracker.onLoadCompleted() starting with:
Code seems to await for this download to complete and only then starts downloading the "real" media playlists corresponding to the variant selected by the ABR algorithm. It does not look like this initial playlist is used (at least it is not used for downloading media segments).
I checked with RFC-8216 and it looks like the only special meaning which this first #EXT-X-STREAM-INF URL has is being a default for systems which do not support multiple #EXT-X-STREAM-INF tags, which is not the case with ExoPlayer.
While in general downloading and discarding this playlist does not change the player behavior, when media playlist is long this additional download and processing may be quite "costly".
So the question is why to use variants.get(0) (and not start directly from the playlist selected by the ABR algorithm)?