Maui
Maui copied to clipboard
[BUG] MediaElement fails to play video as resource on Android
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
MediaElement fails to play a video included in the Resource folder, an exception with the error code ERROR_CODE_IO_FILE_NOT_FOUND ANDROID is caught while attempting to load the video when running the application on an Android device (not emulator, device)
Expected Behavior
The video gets played
Steps To Reproduce
1 Open the CommunityToolkit.Maui.Sample solution 2 Set CommunityToolkit.Maui.Sample as startup project 3 Plug an Android device with developer mode and set it as deployment target 4 Run the app and navigate to Views -> MediaElement 5 Click Change source -> Load Local Resource 6 See that the video fails to be loaded
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/main/samples/CommunityToolkit.Maui.Sample
Environment
- .NET MAUI CommunityToolkit: 5.3.0
- OS: Android 13
Anything else?
No response
It is not just Android. All playing from Resources doesn't work as posted here: https://github.com/CommunityToolkit/Maui/issues/1433
Microsoft/Team, any help?
@BeepBeepBopBop can you test against main and see if the merged fix addresses your issue?
@vhugogarcia this has been fixed with above PR. Tested and verified.
Thanks @ne0rrmatrix for the verification. I'm marking this issue as close.