Returns width, height, rotation, duration, bitrate
of video files.
Works with iOS
and Android
.
Use this until Cordova resolves their issue with MediaFile.getFormatData().
cordova plugin add https://github.com/shahin8r/cordova-plugin-videometadata.git
cordova.plugins.VideoMetadata.file(videoFile, function(data) {
// data contains all our metadata
if (data.rotation == 90 || data.rotation == -90) {
alert("No vertical vids please");
}
}, function(error) {
// error
});