Skip to content

Bug: args.Cue in NativeAOT-build has IInspectable type #2024

@4OTbIPE

Description

@4OTbIPE

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

  1. Create MediaPlaybackItem object with videofile with subtitles
  2. Select TimedTextTrack from embedded subtitles
  3. Subscribe to its CueEntered event
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions