-
Notifications
You must be signed in to change notification settings - Fork 402
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
Fix Windows Autoplay bug #2238
Merged
brminnick
merged 6 commits into
CommunityToolkit:main
from
ne0rrmatrix:FixWindowsAutoPlayBug
Oct 3, 2024
Merged
Fix Windows Autoplay bug #2238
brminnick
merged 6 commits into
CommunityToolkit:main
from
ne0rrmatrix:FixWindowsAutoPlayBug
Oct 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pdateSpeed` Current behavior of autoplay has player pause on opening. Changing the comparision to `(int)MediaElement.Speed` and `(int)previousSpeed` fixes it.
Replaced IsFloatingPointNumberZero with a generic IsZero<TValue> method using the INumber<TValue> interface for improved flexibility and reusability. Updated PlatformUpdateSpeed and OnPlaybackSessionPlaybackStateChanged methods to use IsZero<TValue>. Added System.Numerics namespace to support INumber<TValue>. Introduced new method PlatformUpdateShouldShowPlaybackControls.
brminnick
approved these changes
Oct 3, 2024
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.
Great fix - Thanks James!
KeithBoynton
added a commit
to KeithBoynton/CommunityToolkitMaui
that referenced
this pull request
Oct 31, 2024
* main: Update dependabot.yml Tell Dependabot to ignore required libraries from auto-updating [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2295) [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2292) Fix animation behavior hot reload (CommunityToolkit#2288) Update resourceManagement.yml [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2285) [Housekeeping] Update NuGet Packages (CommunityToolkit#2254) Implement the ability to Close a popup (CommunityToolkit#1688) Add `[Obsolete]` tag Fix FileSaver Progress (CommunityToolkit#2277) Ensure `TouchBehavior.LongPressCompleted` event fires when `LongPressCommand is null` (CommunityToolkit#2239) Add Popup Support for MediaElement on iOS + MacCatalyst (CommunityToolkit#2251) [Sample app] Add MediaElementMultipleWindowsPage (CommunityToolkit#2250) [Sample App] Add Second CarouselView to `MediaElementCarouselViewPage.xaml` (CommunityToolkit#2248) Fix Windows Autoplay bug (CommunityToolkit#2238) Fix Crash on iOS when using MediaElement inside a CarouselView (again) (CommunityToolkit#2245) Refactor URLs and improve logging consistency (CommunityToolkit#2228) Bump xunit from 2.9.1 to 2.9.2 in /samples (CommunityToolkit#2234) Increase `CommunityToolkitSampleApp_Xcode_Version` to `16`
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Current behavior of autoplay has player pause on opening. Changing the comparision to
IsZero<double>(MediaElement.Speed)
andIsZero<double>(previousSpeed)
fixes it.Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
Recently added comparison for doubles was incorrectly returning bad value when comparing to a value of zero. Issue is fixed by casting int onto the double instead of comparing small variation in value.