Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep hls chunk source from getting redundant playlists #5058

Conversation

TakuSemba
Copy link
Contributor

Overview

when playing live hls stream, ExoPlayer periodically getting all playlists which has been loaded at least once. Because of this, ExoPlayer keeps sending network requests more than necessary.

Environment

since version 2.9.0

This is the url that I tested, and it is reproducible on ExoPlayer demo.

You will see ExoPlayer keeps fetching all variants of mediaPlaylist which ExoPlayer has loaded during the playback.

Cause

Inside the HlsChunkSource, HlsChunkSource#createMediaChunkIterators() provides MediaChunkIterator[] that contains information for upcoming media chunks. However, in createMediaChunkIterators(), playlistTracker.getPlaylistSnapshot(variantUrl) is called and it sends an network request to fetch an MediaPlaylist. It's called for every variant that has playlistSnapshot.

I think unselected playlists should no be loaded through network calls from the viewpoint of reducing network requests.

@AquilesCanta
Copy link
Contributor

This does look like a bug. But it needs to be fixed on the HlsPlaylistTracker side. I have filed #5059 to track its fix. Any pushed commits will be referenced there.

@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants