-
Notifications
You must be signed in to change notification settings - Fork 9.8k
fix(video_player): buffering state events missing on Android & Web (fixes flutter/flutter#28494) #2563
fix(video_player): buffering state events missing on Android & Web (fixes flutter/flutter#28494) #2563
Conversation
@iskakaushik @cyanglaz Is it possible to have a look at this? Not a big deal, but quite annoying when the network condition is bad and we can't provide the users with correct message. |
Not sure if it is appropriate to add this here since this issue is specifically for Android, but it has the same problem for flutter web... It'd be great to have this fixed there also! |
Just had a quick glance, the issue seems similar (events not triggered). However, I personally have no experience with directly controlling |
@chengyuhui Yeah that's what it seemed like. Thanks anyway for taking the time to check it out! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for this. Could you also add tests for this? I think e2e test would work in these scenarios.
The version
in the pubspec is not updated.
LGTM |
I was considering adding some tests, but have no idea how to do that, since it seems nothing in the native part has test associated with it, and this is a platform-specific bug. |
@chengyuhui You might be able to add something similar to https://github.com/flutter/plugins/blob/master/packages/video_player/video_player/example/test_driver/video_player_e2e.dart |
I got the idea, but still wondering how this could be done (controlling the underlying buffering status?). I originally discovered this bug entirely by accident (I am in China and the Apple HLS test stream is really slow, but the buffering indicator is not showing up). The logic of applying changes to |
@chengyuhui Which tests did you mean? Could you link me to the code? |
|
@chengyuhui This is only testing the dart apis with a mock controller. We might want to test the android implementation. Maybe an e2e test would help us here? |
The problem is to simulate a stream that requires buffering (ExoPlayer does not seem to have mocking ability). I see some 127.0.0.1 references in the test files, how does that work? |
This is actually working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is there someting I still need to do? |
cc @amirh for review |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@csells blasten is the expert on null-safety so I tagged him for confirmation. He just gave LGTM so I think it's good. |
* master: fix(video_player): buffering state events missing on Android & Web (fixes flutter/flutter#28494) (flutter#2563)
…ixes flutter/flutter#28494) (flutter#2563) (cherry picked from commit b2e9ca5)
Description
Currently the
isBuffering
field on Android does not chage even if the video is buffering, this PR fixed this by sendingbufferingStart
andbufferingEnd
events in the event handler of ExoPlayer.Related Issues
Fixes flutter/flutter#28494
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?