Skip to content
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

Add Popup Support for MediaElement on iOS + MacCatalyst #2251

Merged
merged 8 commits into from
Oct 3, 2024

Conversation

TheCodeTraveler
Copy link
Collaborator

Description of Change

This PR traverses the MediaElement visual tree on iOS to see if it is being used by any control whose Parent.Handler.PlatformView is UIViewController.

If we do find a UIViewController, we add it as a child ViewController to class MauiMediaElement : UIView.

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard

Additional information

This PR adds support for Popup which was broken by PR #2245

@TheCodeTraveler TheCodeTraveler requested review from ne0rrmatrix and removed request for ne0rrmatrix October 3, 2024 22:20
@TheCodeTraveler
Copy link
Collaborator Author

Hhere's a screenshot of MediaElement playing inside a Popup in CommunityToolkit.Maui.Sample

image

Copy link
Contributor

@ne0rrmatrix ne0rrmatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. If you can tap outside popup and open it a second time without issues I would say this PR is GTG

@TheCodeTraveler
Copy link
Collaborator Author

Looks good. If you can tap outside popup and open it a second time without issues I would say this PR is GTG

Excellent! I confirmed that we're good to go 🚀

ezgif-6-06fa368e3b

@TheCodeTraveler TheCodeTraveler merged commit 95cff18 into main Oct 3, 2024
10 checks passed
@TheCodeTraveler TheCodeTraveler deleted the Support-MediaElement-in-Popup branch October 3, 2024 23:37
@ne0rrmatrix
Copy link
Contributor

Setting full screen while in popup and then going back to normal causes crash on IOS 18.x running xcode 16.x

@ne0rrmatrix
Copy link
Contributor

9F1D8AB0-4EB8-44F1-9CFD-4D9F605DD087

@TheCodeTraveler
Copy link
Collaborator Author

Good catch, @ne0rrmatrix. Could you please open a new Issue for this to ensure we don't lose track of this bug?

KeithBoynton added a commit to KeithBoynton/CommunityToolkitMaui that referenced this pull request Oct 31, 2024
* main:
  Update dependabot.yml
  Tell Dependabot to ignore required libraries from auto-updating
  [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2295)
  [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2292)
  Fix animation behavior hot reload (CommunityToolkit#2288)
  Update resourceManagement.yml
  [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2285)
  [Housekeeping] Update NuGet Packages (CommunityToolkit#2254)
  Implement the ability to Close a popup (CommunityToolkit#1688)
  Add `[Obsolete]` tag
  Fix FileSaver Progress (CommunityToolkit#2277)
  Ensure `TouchBehavior.LongPressCompleted` event fires when `LongPressCommand is null` (CommunityToolkit#2239)
  Add Popup Support for MediaElement on iOS + MacCatalyst (CommunityToolkit#2251)
  [Sample app] Add MediaElementMultipleWindowsPage (CommunityToolkit#2250)
  [Sample App] Add Second CarouselView to `MediaElementCarouselViewPage.xaml` (CommunityToolkit#2248)
  Fix Windows Autoplay bug (CommunityToolkit#2238)
  Fix Crash on iOS when using MediaElement inside a CarouselView (again) (CommunityToolkit#2245)
  Refactor URLs and improve logging consistency (CommunityToolkit#2228)
  Bump xunit from 2.9.1 to 2.9.2 in /samples (CommunityToolkit#2234)
  Increase `CommunityToolkitSampleApp_Xcode_Version` to `16`
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] iOS MediaElement Crashes When in Popup
2 participants