Maui
Maui copied to clipboard
[BUG] MediaSource not Disposed on Exit
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
When exiting page with media element and then opening page again it can fail to load a URL when setting source. This occurs on the third try. I also noticed when leaving page and trying to enter page you need to first need to load a different page then back to media element. This only happens in Windows. The controls also do not work as expected and are missing icons.
Expected Behavior
When you exit a page you should be able to enter the page again. If you load a page with a media element it should load the URL set as source.
Steps To Reproduce
-
Open sample app
-
Navigate to media element page
-
exit page
-
enter page
-
it fails to enter page
-
Open sample app
-
Navigate to media element page
-
exit page
-
enter another page
-
exit that page
-
enter media element
-
Repeat step 3 to 6 another 2 times
-
On second repeat of steps 3 to 6 if will fail to load URL.
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/main/samples
Environment
- .NET MAUI CommunityToolkit: 9.x
- OS:Windows 10 Build 10.0.19041.0
- .NET MAUI:8.x
Anything else?
This is an issue that has existed for multiple major version of Media Element. From what I can test it affects nearly all versions.