CommunityToolkit / CommunityToolkit/Maui

[BUG] MediaElement on iOS: `[AVAssetTrack loadValuesAsynchronouslyForKeys:completionHandler:] invoked with unrecognized keys`

Open
#2,221 2 comments 3 reactions 1 assignee Claimed by @TheCodeTraveler View on GitHub
📽️ MediaElement bug
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### 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

When running MediaElement on iOS, the console output reports the following error:
```
2024-09-21 14:39:41.118981-0700 CommunityToolkit.Maui.Sample[72993:5603957] -[AVAssetTrack loadValuesAsynchronouslyForKeys:completionHandler:] invoked with unrecognized keys (
"currentVideoTrack.preferredTransform"
)
```

### Expected Behavior

We should not be unintentionally inducing errors

### Steps To Reproduce

1. In Visual Studio, build + deploy `CommunityToolkit.Maui.Sample` to an iOS Simulator
2. In the iOS Simulator, navigate to Views -> MediaElement
3. In the Console Output window, confirm the following error:

```
[AVAssetTrack loadValuesAsynchronouslyForKeys:completionHandler:] invoked with unrecognized keys (
"currentVideoTrack.preferredTransform"
)
```

### Link to public reproduction project repository

https://github.com/CommunityToolkit/Maui

### Environment

```markdown
- .NET MAUI CommunityToolkit: v9.0.3
- OS: iOS 17.5
- .NET MAUI: 8.0.72
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.