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

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

Open
CreeschYT opened this issue May 30, 2019 · 6 comments
Open
Assignees

Comments

@CreeschYT
Copy link

CreeschYT commented May 30, 2019

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

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)

@CreeschYT CreeschYT changed the title previous button resets timer and has to be clicked twice to play the previous url. Previous button resets timer and has to be clicked twice to play the previous url. May 30, 2019
@ojw28
Copy link
Contributor

ojw28 commented May 30, 2019

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.

@CreeschYT
Copy link
Author

umm. Excuse me, but why did you add the label low priority ?

@tonihei
Copy link
Collaborator

tonihei commented Jul 1, 2019

Actually, the logic mentioned above is already implemented. The underlying problem here is that progressive live streams are not marked as "dynamic". Marking as an enhancement instead.

Note that this is also related to #2668 where we try to improve the way to denote live streams in general.

The "low priority" label is used to mark issues which we not plan to address immediately. These are often things which are too specialized or require major changes. Removing the label for this case.

@tonihei tonihei changed the title Previous button resets timer and has to be clicked twice to play the previous url. Report progressive live streams as dynamic/live to improve UI interactions Jul 1, 2019
@tonihei tonihei assigned tonihei and unassigned ojw28 Jul 1, 2019
@CreeschYT
Copy link
Author

Ok, thank you

ojw28 pushed a commit that referenced this issue Oct 2, 2019
This flag is currently merged into Window.isDynamic, which isn't always true
because
1. A window can be dynamic for other reasons (e.g. when the duration is still
missing).
2. A live stream can be become non-dynamic when it ends.

Issue:#2668
Issue:#5973
PiperOrigin-RevId: 271999378
@ojw28
Copy link
Contributor

ojw28 commented Nov 5, 2019

@tonihei - Can this be closed as fixed?

@tonihei
Copy link
Collaborator

tonihei commented Nov 5, 2019

No, the second part about improving UI interactions isn't solved yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants