Report progressive live streams as dynamic/live to improve UI interactions
See original GitHub issueContent 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
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)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
This is working as intended for on-demand streams and for live streams that are seekable. In these cases pressing back will seek back to the start of the current stream, unless playback is already near the start.
You’re right that this doesn’t make sense for non-seekable live streams, which is what you’re dealing with here. We should adjust the logic for that case.
No, the second part about improving UI interactions isn’t solved yet.