Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[BUG] MediaSource not Disposed on Exit

Open ne0rrmatrix opened this issue 4 months ago • 0 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

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

  1. Open sample app

  2. Navigate to media element page

  3. exit page

  4. enter page

  5. it fails to enter page

  6. Open sample app

  7. Navigate to media element page

  8. exit page

  9. enter another page

  10. exit that page

  11. enter media element

  12. Repeat step 3 to 6 another 2 times

  13. 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.

ne0rrmatrix avatar Oct 07 '24 19:10 ne0rrmatrix