Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[BUG] MediaElement fails to play video as resource on Android

Open BeepBeepBopBop opened this issue 2 years ago • 2 comments

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

BeepBeepBopBop avatar Sep 10 '23 16:09 BeepBeepBopBop

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?

jonmdev avatar Oct 12 '23 04:10 jonmdev

@BeepBeepBopBop can you test against main and see if the merged fix addresses your issue?

ne0rrmatrix avatar Nov 30 '23 09:11 ne0rrmatrix

@vhugogarcia this has been fixed with above PR. Tested and verified.

ne0rrmatrix avatar Jun 17 '24 21:06 ne0rrmatrix

Thanks @ne0rrmatrix for the verification. I'm marking this issue as close.

vhugogarcia avatar Jun 17 '24 21:06 vhugogarcia