Closed elaunch-keval closed 3 years ago
@keval-d thanks for your reference it helped a lot, I have added this in the new version
This solved my issue.
jsonObj["orientation"] = String(videoOrientation(tracks: tracks))
private func videoOrientation(tracks :[AVAssetTrack]) -> Int {
if let videoTrack = tracks.first {
let txf = videoTrack.preferredTransform
return Int(Double(atan2(txf.b, txf.a) * 180) / Double.pi)
}
return 0
}
I checked plugin iOS code but i did't find code for orientation.
For reference : https://gist.github.com/wdcurry/433dd1db8f315cf6edd9ff8d2ee6f411