Search code examples
mauimaui-community-toolkit

Maui Community Toolkit MediaElement crashing


I am having problems with the Maui Community Toolkit MediaElement. To boil down the problem, I have created a brand new Maui App template, followed https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/mediaelement and only added:

<toolkit:MediaElement HeightRequest="400" WidthRequest="400" Source="https://commondatastorage.googleapis.com/gtv-videosbucket/sample/BigBuckBunny.mp4" ShouldShowPlaybackControls="True" />

I keep getting this error/exception in the console:

MediaManager: Error: AndroidX.LocalBroadcastManager.Content.LocalBroadcastManager not supported on Android 13 and above.

The problem, however, gets worse in my real app. After implementing the IPopupService from the Toolkit the Mediaelement crashes the app:

Information: 0 : MediaControlsService destroyed.
The program 'xxxxx.MAUI.dll' has exited with code 0 (0x0).

Any ideas why this happens? Any ideas how this can be handled?


Solution

  • Is fixed by the Community Toolkit crew: https://github.com/CommunityToolkit/Maui/issues/2143