Bug: args.Cue in NativeAOT-build has IInspectable type
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 665
- Forks
- 134
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
Description
When custom handling subtitles in MediaPlaybackItem in UWP on .NET 9, the argument type changes to WinRT.IInspectable in NativeAOT build.
This code in Debug build outputs ImageCue (in the case of my video file, which is correct), and when built in NativeAOT it starts outputting IInspectable.
private void CurrentSubtitle_CueEntered(TimedMetadataTrack sender, MediaCueEventArgs args)
{
RunOnUIThread(() =>
{
DebugText.Text = args.Cue.GetType().Name;
});
}
Steps To Reproduce
- Create MediaPlaybackItem object with videofile with subtitles
- Select TimedTextTrack from embedded subtitles
- Subscribe to its CueEntered event
- Output somewhere type of args.Cue in CueEntered event handler
Expected Behavior
args.Cue has the same type in NativeAOT build as in debug-build.
Version Info
.NET: 9.0.7
CsWinRT: 2.2.0
Windows SDK: 10.0.26100
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the MediaPlaybackItem subtitle CueEntered scenario described in the issue under both Debug and NativeAOT builds, using the reported .NET, CsWinRT, and Windows SDK versions. Trace the projected MediaCue handling and compare args.Cue types; done means NativeAOT reports the same cue type as the Debug build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100