Skip to content

[BUG] Media Element Button not firing as Expected #2048

@ne0rrmatrix

Description

@ne0rrmatrix

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

When you start MediaElement the buttons on API level 32 and below do not behave as expected.

Expected Behavior

When you click on Pause/Play it should not just pause but also update the notification icon with current status. It does not. The button does not change if the first pause/play cycle is started from the notification tray. If you start from the player it works fine afterwards.

Steps To Reproduce

  1. Open and run sample from repo.
  2. Navigate to MediaElement page.
  3. Click on pause in notification tray before doing anything on page.
  4. Notice that the icon does not update/change.

Link to public reproduction project repository

https://github.com/CommunityToolkit/Maui/tree/main/samples

Environment

- .NET MAUI CommunityToolkit: 9.0.2
- OS: All
- .NET MAUI: 8.0.61
- .NET Maui CommunityToolkitMediaElement: 4.0.1

Anything else?

Issue is caused by a combination of threading and string interpolation. Fix incoming.

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