-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[video_player]: reduce video player position update interval from 500ms to 100ms #8346
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
[video_player]: reduce video player position update interval from 500ms to 100ms #8346
Conversation
…ow setting position updates periodic intervals
Per discussion linked from flutter/flutter#90080 (comment) I'm skeptical that this is API we want to add. If subtitles don't work reliably at the current update frequency, and higher update frequencies don't have noticeable performance impact, then we should simply increase the frequency. If it does have performance issues, then we should figure out a different way of triggering subtitle changes. Either way, I would expect that we should be able to resolve the issue without new public API and without requiring extra configuration. |
I kept searching for the previous discussions but couldn't find them. Thank you for providing the link. Would an update frequency of 100ms work? I think it would be very effective for subtitles and not frequent enough to cause a high load on devices. if you agree, i can open a new pr with that change and add a test to make sure captions are included in the timer consideration |
note: this is how i override it from the app side, i didnt like the approach this is why i opened this pr
|
i updated the pr to be an update to value from 500 to 100 ms, and the test case. hope thats okay |
await intervalUpdateCompleter.future.timeout(const Duration(seconds: 5)); | ||
|
||
// Verify that the intervals between updates are approximately correct | ||
expect(positions[1] - positions[0], greaterThanOrEqualTo(customInterval)); |
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.
Wouldn't this test as written pass without the rest of the PR?
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.
just tested using 500 ms for the updates and it failed, but i will add another test related to the captions since its the more related to this pr
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.
I added the other test and I hope its shows the problem more, let me know if there anything else I can fix.
Thank you.
…val from 500ms to 100ms
…o_player_test.dart
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 with one change. @tarrinneal for second review.
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, with some clarity in the changelog.
…c-function-for-setting-periodic-duration
autosubmit label was removed for flutter/packages/8346, because - The status or check suite Linux dart_unit_test_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
This is hitting the known camerax flake; it's unrelated to the PR. |
…l from 500ms to 100ms (flutter/packages#8346)
flutter/packages@d450e1b...dd781d4 2025-03-19 robert.odrowaz@leancode.pl [camera_avfoundation] Tests backfilling - part 4 (flutter/packages#8854) 2025-03-18 robert.odrowaz@leancode.pl [camera_avfoundation] Tests backfilling - part 5 (flutter/packages#8873) 2025-03-18 zezohassam@gmail.com [video_player]: reduce video player position update interval from 500ms to 100ms (flutter/packages#8346) 2025-03-18 joonas.kerttula@codemate.com [google_maps_flutter] Support for Ground Overlay (flutter/packages#8432) 2025-03-18 joonas.kerttula@codemate.com [google_maps_flutter] Ground overlay support - platform impls (flutter/packages#8563) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ms to 100ms (flutter#8346) Description reduce video player position update interval from 500ms to 100ms to fix the issue of fast captions not showing for their intended time *List which issues are fixed by this PR. You must list at least one issue.* flutter/flutter#160855
…r#165489) flutter/packages@d450e1b...dd781d4 2025-03-19 robert.odrowaz@leancode.pl [camera_avfoundation] Tests backfilling - part 4 (flutter/packages#8854) 2025-03-18 robert.odrowaz@leancode.pl [camera_avfoundation] Tests backfilling - part 5 (flutter/packages#8873) 2025-03-18 zezohassam@gmail.com [video_player]: reduce video player position update interval from 500ms to 100ms (flutter/packages#8346) 2025-03-18 joonas.kerttula@codemate.com [google_maps_flutter] Support for Ground Overlay (flutter/packages#8432) 2025-03-18 joonas.kerttula@codemate.com [google_maps_flutter] Ground overlay support - platform impls (flutter/packages#8563) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ms to 100ms (flutter#8346) Description reduce video player position update interval from 500ms to 100ms to fix the issue of fast captions not showing for their intended time *List which issues are fixed by this PR. You must list at least one issue.* flutter/flutter#160855
Description
reduce video player position update interval from 500ms to 100ms to fix the issue of fast captions not showing for their intended time
List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter#160855
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.