Search code examples
cordovacordova-plugins

Get video metadata with cordova-plugin-media-capture


According to docs there is a MediaFile.getFormatData() method that returns metadata of video file. This function does not work as seen here: https://issues.apache.org/jira/browse/CB-4541

getFormatData() returns {"codecs":"","bitrate":0,"duration":0,"height":0,"width":0}.

Now is there any other way to get this metadata from a video with Cordova?


Solution

  • Had to make my own Cordova plugin.

    https://github.com/shahin8r/cordova-plugin-videometadata