I'm streaming an online or localy downloaded mp4 video via AVPlayer component. Some mp4 files have wrong orientation, but EXIF metadata says how video should be rotated when played. However, AVPlayer doesn't seem to respect that.
Is there any way to make AVPlayer respect EXIF metadata and rotate video accordingly.
[asset.tracks[0] preferredTransform]
gives transform on how video should be rotated, but if applied to UIView or CALayer then it's still not properly rotated.
On the other hand, Android and web client play same videos correctly meaning that there's nothing wrong with video files.