-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Crash on iOS when using MediaElement inside a CarouselView #2187
Conversation
I am very happy to see this PR! I just finished testing it in IOS and for Mac Catalyst. It works as intended and everything is fully working now. The only thing I could think of that could be done in a different PR maybe is adding another page and testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said in the comment. It all looks good. I am also very happy to report I tested it against a mac and ipad. No issues on either CaraouselView
or regular MediaElement
. My only wish is to now either have you add another sample page with CollectionView
. If you don't want to I would be happy to do it.
Sure - go for it! I'll go ahead and merge this PR in the meantime to get the bug fix into the code base. You can assign your PR adding a CollectionView sample to me when it's ready for review 👍 |
@brminnick I also just wanted to express my gratitude for the fix - thank you!! 🥳 |
Description of Change
This Pull Request adds support for MediaElement inside of DataTemplate.
This Pull Request also adds
MediaElementCarouselViewPage
to the Sample App.Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
This fix requires reflection because the Controller property that we need to reference when
MediaElement
is inside of aDataTemplate
is aprotected internal
property in the ItemsViewContoller class: https://github.com/dotnet/maui/blob/cf002538cb73db4bf187a51e4786d7478a7025ee/src/Controls/src/Core/Handlers/Items/ItemsViewHandler.iOS.cs#L39Because this uses reflection, it is important to manually test the
MediaElementCarouselViewPage
whenever we update our .NET MAUI Workload (egnet8.0-ios
->net9.0-ios
) to ensure there are no breaking changes caused by reflection and/or the renaming of internal properties.