Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[BUG] MediaElement background doesn't change on iOS

Open juniorsaraviao opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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

  • [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

Current Behavior

I'm setting the BackgroundColor property in the MediaElement but it looks like the color doesn't change on iOS (looks OK on Android).

<toolkit:MediaElement Source="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
                              ShouldShowPlaybackControls="False"
                              ShouldAutoPlay="True"
                              Volume="0"
                              ShouldLoopPlayback="True"
                              HeightRequest="300"
                              BackgroundColor="Red"
                              HorizontalOptions="Fill"
                              Aspect="AspectFit"
                              />

Expected Behavior

When setting the BackgroundColor property in the MediaElement, the color should be updated on iOS.

Steps To Reproduce

  1. Clone the project https://github.com/juniorsaraviao/VideoSample/tree/master.
  2. Run the project on Android and iOS.

Link to public reproduction project repository

https://github.com/juniorsaraviao/VideoSample/tree/master

Environment

- .NET MAUI CommunityToolkit: 3.0.1
- OS: macOS Sonoma 14.1.1
- .NET MAUI: 8.0.3

Anything else?

No response

juniorsaraviao avatar Jan 23 '24 23:01 juniorsaraviao

@vhugogarcia I can verify the behavior on Android as being buggy. This is a simple fix that I can apply for android only.

This issue also applies to windows and cannot be fixed. It is by design on windows. MS limits access to classes and has indicated in xaml repo that is that way by design and we have no way to change it.

ne0rrmatrix avatar Jun 19 '24 19:06 ne0rrmatrix