google / google/ExoPlayer

Keep already buffered data when seeking to another period

Open
#5,020 1 comment 1 reaction 1 assignee Claimed by @marcbaechinger View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Issue description
I am trying to play multiple media streams in a `ConcatenatingMediaSource`. I can get the next tracks to buffer ahead of time. However when seeking within a track or to the next track, the buffered media is re-downloaded. We tracked this issue using Charles proxy and monitoring our network requests.

### Reproduction steps
- Set up Charles Proxy to monitor network traffic.
- Enter the "Clear -> Enc -> Clear -> Enc -> Enc" sample playlist.
- Press the Seek Forward Button (Second from the right)

At this point if you look at the Charles traffic there should be multiple responses with the same byte range. We have attached our Charles logs and you can see that the 2nd and 8th, as well as the 5th and the 10th are duplicate calls.
[exoplayer_issue.chls.zip](https://github.com/google/ExoPlayer/files/2527230/exoplayer_issue.chls.zip)

### Link to test content
This was reproduced using the Exoplayer demo app.

### Version of ExoPlayer being used
2.9.0

### Device(s) and version(s) of Android being used
Samsung Galaxy S9, Android 8.0
Google Pixel 2, Android 8.0

### A full bug report captured from the device
[bugreport-2018-10-30-01-07-36.zip](https://github.com/google/ExoPlayer/files/2527278/bugreport-2018-10-30-01-07-36.zip)

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.