Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] MediaElement wont dispose on fresh install? #1991

@Pmr-precure

Description

@Pmr-precure

Description

Okay, I have this weird bug that I really hope you guys can help me.

I use a MediaElement to show a video, that MediaElement is inside of a StateView.
When I install the App totally fresh it acts very weird, let me try to show with some screenshots:
I put an eventlistener on the media element to show the state of it.

image
Here after the fresh install i see the mediaelement plays as it should, now i press our button "Skan QR koden":

image
Now i see part of the video showing, in the camera field (sometimes you have to minimize the app and reopen it to make it appear).
I have tried to NULL the source of the mediaelement when switching state, nothing seems to kill the player.

Okay but now I close/rebuild the app and run it again:
image

The mediaelement is playing the video as it should. I now go to the QR page:
image
The media element now stopped as I expected and is not shown partly on the camera view.

I really have no idea whats going on. Please let me know if i didnt explain it well enough.

This is btw only an Android issue it seems.
I tried to create a custom renderer for the mediaelement, and i see in both cases that the Release method gets called, with no errors. But it seems like it only gets released on the 2nd try and not on a fresh install....

We have always struggled with the MediaElement ( we use a lot of tutorial videos) especially using them in a CarouselView ( but we solved those by stopping and/or using Opacity 0 to hide old videos).

I tried upgrading all my nuget packages, but still the same issue.

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android: 12
    • UWP:
  • Android Support Library Version:
  • Nuget Packages: XCT 2.0.4 - Xamarin 5.0.0.2515
  • Affected Devices: Tested on emulators. Huawei P30, different Xiaomi phones.

Workaround

No work around found.

Reproduction imagery

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Breaky break.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions