Skip to content

[BUG] MediaElement (video) inside Popup on Android has multiple issues #3178

@AdalbertKhoolsaat

Description

@AdalbertKhoolsaat

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

I am noticing several issues when trying to have a video open within a Popup (on Android):

  1. When opening with its initial size, playback works, but interaction with the playback control (pause/resume) is a bit janky. This will cause the video to stutter and intermittently disappear. This does not happen if MediaElement is directly on a page. (this might be an issue with the emulator, though I'm unsure)

  2. When going fullscreen, the Popup is now in front of the MediaElement, as already pointed out in this issue. I assumed this had already been solved, but apparently not.

  3. With default Popup-settings and in fullscreen-mode, any attempt to interact with the playback controls will be treated as clicking outside the Popup, causing it to close.

  4. If this Popup-behavior is disabled by setting CanBeDismissedByTappingOutsideOfPopup = false, it still does not work. Because now the fullscreen videoplayer can no longer be interacted with. Tapping the screen no longer brings up playback controls. So no way to exit fullscreen-mode either. Without a dedicated close-button (or auto-close on MediaEnded) you're stuck at this point.

Expected Behavior

I consider problem 3) to be expected behavior, 1), 2) and 4) certainly not.

Problem 2) in particular is problematic because the issue was raised before, but now it's closed yet unresolved.

I would expect two controls from the CommunityToolkit to work well together, specifically in an MVVM-setup.
If this particular setup has known limitations, it should be documented somewhere.
If there is a proper workaround (i.e. NOT in code-behind) I would love to hear it!

Steps To Reproduce

  1. Open and run the solution from this reproduction repository

  2. Default setup can be used to check problems 1, 2 and 4.

By changing the PopupOptions in MainPageVM, one can observe 'problem' 3 where trying to interact with the fullscreen player is treated as tapping outside the popup.

Link to public reproduction project repository

https://github.com/AdalbertKhoolsaat/MauiAndroidMediaElementInPopupIssue

Environment

- .NET MAUI CommunityToolkit: 14.0.1
- .NET MAUI CommunityToolkit MediaElement: 8.0.1
- .NET MAUI: 10.0.100
- OS: Android 15.0 (API 35)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions