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

Add preserve all member to media element class (shared) #2004

Conversation

FedericoNembrini
Copy link
Contributor

Description of Bug

Some properties of MediaElement class are removed by linker if not accessed from code (due to IMediaElementController?). To prevent this we should add [Preserve(AllMember=True)] to MediaElement class.

I think MediaElement is quite bugged. On some devices this change cause the application to hang, and I think the reason is because now that the MediaElement.Positon is called it will loop at line 95

public TimeSpan Position
{
get
{
PositionRequested?.Invoke(this, EventArgs.Empty);
return (TimeSpan)GetValue(PositionProperty);
}

Is there a reason why we can't get rid of this line?

Issues Fixed

PR Checklist

  • Has a linked Issue, and the Issue has been approved
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation

@jfversluis
Copy link
Member

Now that we're so close to the sunsetting of Xamarin (and therefore also Xamarin Community Toolkit) unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR, we really appreciate it.

Please have a look at the evolution of the Xamarin Community Toolkit, The .NET MAUI Community Toolkit. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.

Again, thank you so much for being a contributor and Xamarin user!

@jfversluis jfversluis closed this Apr 26, 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] MediaLayout example with Slider. Slider not moves in iOS, like the binding for Buffering is not working
2 participants