Fixed-unmute-issue-Chrome
This PR modifies the setVolume function for video elements to properly handle muting without resetting the volume. When the volume is set to 0.0, the video is muted without changing the volume itself, preventing issues with unmuting in certain browsers (like Chrome with Tap Emulation). This ensures the user can mute and unmute videos as expected without affecting the volume settings.
Fixes issue: flutter/flutter#156444
Pre-launch Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the CLA.
- [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I linked to at least one issue that this PR fixes in the description above.
- [ ] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes. - [ ] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is test-exempt.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).
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. 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 add a test for this case! This test is probably going to break:
- https://github.com/flutter/packages/blob/main/packages/video_player/video_player_web/example/integration_test/video_player_test.dart#L43-L58
You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the checklist reflects the state of the PR as posted please feel free to mark it as ready for review.
Duplicate of https://github.com/flutter/packages/pull/7828
Can you please collaborate with @tbansod2018 to get this landed in a single PR?
I'm unsure why the tree status is failing. I've tried formatting, but it didn't resolve the issue. Do I need to update the CHANGELOG.md for this change, or is it exempt from versioning?
Do I need to update the CHANGELOG.md for this change, or is it exempt from versioning?
You do need to update the pubspec and CHANGELOG version, since this is changing a user-facing feature, and it needs to be published to pub.dev.
auto label is removed for flutter/packages/7845, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
- Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.
Ah woops, we need a second reviewer! I'll find someone!