Open alexwilson-motasoft opened 2 years ago
Work around using another plugin for others coming across this issue. In combination with this plug in, use cordova-plugin-video-editor and use their GetVideoInfo()
function to provide accurate orientation with out extra logic, regardless of platform.
Here is an example using Ionic's types in an angular app.
private async getOrientation(fileUrl: string): Promise<string> {
const videoInfo = await this.videoEditor.getVideoInfo({
fileUri: fileUrl
});
return videoInfo.orientation;
}
Bug Report
Problem
MediaFile.getFormatData() displays the same width/height regardless of video capture orientation on iOS.
What is expected to happen?
Expected to get the videos dimensions so I can figure out the orientation the video was captured in.
What does actually happen?
Calling MediaFile.getFormatData() always gives this object:
Information
Using this to get the media orientation
Command or Code
Environment, Platform, Device
Ionic, Cordova IOS 6.0.2, iPhone XR, iOS 14.4.1
Version information
Checklist