Repository navigation
MediaElement v11.0.0 Bug Fix-A-Palooza #3387
TheCodeTraveler
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
MediaElement v11.0.0 Bug Fix-A-Palooza 🎉
We have FINALLY implemented Device Tests! These are platform-specific unit tests that run on iOS, Android, MacCatalyst and Windows. This allows us to unit test all platform-specific code and has MASSIVELY increased our Unit Test Code Coverage to 91.8% Code Coverage on
CommunityToolkti.Maui.MediaElement.Breaking Changes
To fix certain bugs, and re-align features to ensure they behave the same across all platforms, we did have to modify some APIs and the associated underlying behavior. Please find the features you use, below, and update your apps accordingly.
All packages
ArgumentNullExceptionat the call. Public and protected members of the five libraries now guard the non-nullable reference parameters they cannot handle (about 275 guards).NullReferenceExceptionlater (or was stored silently) fails at the call, with aParamName. What to do: fix the caller.IProgress<double>or aPaintbackground of null.BasePlatformBehaviorguards onlybindable. A null platform view passes through, because the AndroidIconTintColorBehavioraccepts it.<queries>entry for the launcher (MAIN/HOME) to the app's merged manifest through the package's library manifest (src/CommunityToolkit.Maui.Core/AndroidManifest.xml). Badge needs it on Android 11 and later. If your app or Play listing reviews<queries>, check the merged manifest.System.Speech10.0.11 (it was 10.0.1). No action is needed unless you pin the package. This comes from Update Unit Tests Packages #3288 on main, not from this PR.New APIs In This Release
Popupnow declaresIPaddingElement, which it already inherited fromContentViewGravatarImageSourcedeclaresIStreamImageSource, which it already inherited fromStreamImageSource, and overridesCancel()(see GravatarImageSource, after that ApiCompat run);[SupportedOSPlatform("android23.0")]on the AndroidStatusBarBehavior(see StatusBar and StatusBarBehavior).DefaultPopupSettings.BackgroundColorDarkandOnInitializing(AddPopupsupport forAppTheme, IntroduceDefaultPopupSettings.OnInitializing#3345)NumericValidationBehavior.Interval(Add interval validation to NumericValidationBehavior #3329)MediaElement
API
FileMediaSourceConverter.ConvertFrom(null)throwsArgumentNullException.MediaFailedEventArgsrejects null for its non-nullable members.Behavior
Sourcechanges is reported throughMediaFailed.StateChanged,PropertyChangedorPropertyChanginghandler reached the code that setSource, or ended the app when MAUI set it from XAML or a binding.MediaFailed:ErrorMessagenames its type and message, andCurrentStateis not set to Failed.MediaFailed, and checkErrorMessagebefore treating everyMediaFailedas a failed source.SeekToclamps a position outside the media to its start or end and raisesSeekCompleted. On iOS such a seek never completed.SeekTofails with the platform's exception, for exampleInvalidOperationExceptionbefore the player is ready, where that exception ended the app.Play()at the end of the media starts it again on iOS and Mac Catalyst, as on Android.CurrentStatereportsBufferingwhile buffering (it wasPaused) andStoppedat the end of the media.None.MediaElementPagealive 3 of 3 times after it was left (0 of 3 with the fix). The same leak is fixed and tested on Android, Mac Catalyst and Windows.MediaOpenedarrives on the player's worker thread. An open that was still running when the handler disconnected no longer starts the timer again: the timer starts on the UI thread, and only while a handler is attached.MediaElementFromStreamPagewasIAsyncDisposable, so the window's service scope kept every page that was opened.FileMediaSourceConverter.ConvertFromhad an inverted condition. A real path threwInvalidOperationException, and an empty or white-space string returned a source. Now a real path returns theFileMediaSource, and an empty or white-space string throwsInvalidOperationException, as documented.What's Changed
This discussion was created from the release MediaElement v11.0.0 Bug Fix-A-Palooza.
All reactions