-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[video_player] Seek to live edge #9181
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
base: main
Are you sure you want to change the base?
Conversation
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
Thanks for the contribution! Please see https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#platform-support. This is exposing new API at the app-facing package layer, but only implementing it on Android, and there's no discussion of what this would look like on other platforms; it would not be landed as-is. Have you looked at iOS and web to see what the equivalent functionality is? |
Hi @stuartmorgan-g , thanks for the feedback. I have no web or ios programming experience but I gave it a shot. Here are my remarks: darwinIt seems the current play/pause behavior on macos already is different from android. On Android, playing a live stream automatically jumps to the live edge. When you pause, wait 5 secs, and resume, the video resumes where it left off. On macOS, starting the player on the same url at the same time, I get a whole different picture (and point in time). My current hypothesis: webI did not find a sample stream that would decode on web. I kept getting "unsupported format". So I was not able to test the implementation. conclusionUnless somebody experienced can jump in and help me out, I think I will have to reduce scope and only add this functionality to android package. If I leave out the changes to the app facing package interface and only add the functionality to BTW, i extended the example to include a HLS live stream. |
This PR adds the
seekToDefaultPosition
method:fixes flutter/flutter#168097
Before adding tests/changelog/etc, I'd like to know if you agree with this change in general 😉
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3