google / google/ExoPlayer

Keep list of available formats when using HLS chunkful preparation.

Open
#6,336 0 comments 2 reactions 1 assignee Claimed by @AquilesCanta View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Use case description
When using HLS chunkful preparation or when using a media playlist directly, we need to load at least one of the segments to determine the available formats. However, we do this for every created MediaPeriod, which is wasteful because the formats are not supposed to change if the preparation completed once.

### Proposed solution
We should keep the list of tracks in the HlsMediaSource and use it for all subsequent MediaPeriods without loading a segment again. This also prevents problems like #6314 from occurring in the first place.

### Alternatives considered
n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.