google / google/ExoPlayer

Report progressive live streams as dynamic/live to improve UI interactions

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

Description

### Content description
I'm developing an `m3u` player which asks the user to choose an `m3u` file. The `m3u` urls are put in a `ConcatenatingMediaSource` the urls work fine. When the user presses 'Next' the next url should play which works. There are two timers one on the left and on the right. The one on the left counts. The one on the right stays at zero (because of `m3u livestreaming`). The problem is that when I press 'Previous' the counter on the left goes to 0:00 and then back to the time before the Previous button was pressed. The url being played has not changed. So I have to click to Previous button twice and fast to go back instead of pressing once. The Code:

```
try {
BufferedReader br = new BufferedReader(new FileReader(filePath));
String line;

while ((line = br.readLine()) != null) {
if (line.startsWith("h")){
lineStore.add(line);

}

}
br.close();
} catch (Exception e) {
Log.e("MainAcvtivity"," exoplayer error "+ e.toString());
}

for (String url : lineStore) {
mediaSources.add(new ExtractorMediaSource.Factory(dataSourceFactory).createMediaSource(Uri.parse(url)));

}

concatenatingMediaSource = new ConcatenatingMediaSource(mediaSources.toArray(new MediaSource[mediaSources.size()]));
exoPlayer.prepare(concatenatingMediaSource);
exoPlayer.setPlayWhenReady(true);

```

### Link to test content
The m3u file I used:
[Test.zip](https://github.com/google/ExoPlayer/files/3237525/Test.zip)

### Version of ExoPlayer being used
I'm currently using exoplayer 2.9.1

### Device(s) and version(s) of Android being used
I expected my app to run on a minimum of Android version 5.0. I also have tested my App on my phone (Samsung S6, Android 7.0) and on a (Samsung s4 mini, Android 6.0)

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.