Apple platform
iOS
Framework version
net10.0-*
Affected platform version
VS2026 18.0.0, .NET 10.0
Description
It looks like the the binding for this method from the apple docs:
https://developer.apple.com/documentation/avfoundation/avasset/loadtracks(withmediatype:completionhandler:)
and here in the microsoft docs:
https://learn.microsoft.com/lb-lu/dotnet/api/avfoundation.avasset.loadtrackswithmediatypeasync?view=net-ios-26.4-10.0
is incorrect.
The return type should be avassettrack not AVMutableCompositionTrack
Steps to Reproduce
You can observe the behavior by reading the apple docs and the microsoft docs and see that the type is wrong.
Simply run the following:
var asset = AVUrlAsset.Create(NSUrl.FromString(videoUrl));
var sourceVideoTracks = await asset.LoadTracksWithMediaTypeAsync(AVMediaTypesExtensions.GetConstant(AVMediaTypes.Video));
var x = sourceVideoTracks[0];
Did you find any workaround?
I would suggest changing the return type to AVAssetTrack
Relevant log output
No response
Apple platform
iOS
Framework version
net10.0-*
Affected platform version
VS2026 18.0.0, .NET 10.0
Description
It looks like the the binding for this method from the apple docs:
https://developer.apple.com/documentation/avfoundation/avasset/loadtracks(withmediatype:completionhandler:)
and here in the microsoft docs:
https://learn.microsoft.com/lb-lu/dotnet/api/avfoundation.avasset.loadtrackswithmediatypeasync?view=net-ios-26.4-10.0
is incorrect.
The return type should be avassettrack not AVMutableCompositionTrack
Steps to Reproduce
You can observe the behavior by reading the apple docs and the microsoft docs and see that the type is wrong.
Simply run the following:
var asset = AVUrlAsset.Create(NSUrl.FromString(videoUrl));
var sourceVideoTracks = await asset.LoadTracksWithMediaTypeAsync(AVMediaTypesExtensions.GetConstant(AVMediaTypes.Video));
var x = sourceVideoTracks[0];
Did you find any workaround?
I would suggest changing the return type to AVAssetTrack
Relevant log output
No response