cordova: media.getDuration returns -1
问题 I am using Media.getDuration() function to get duration of an audio file but I am always getting -1 as response. This works fine if I build using build.phonegap.com But whenever I build using cli I then getDuration does not work. Following are simple steps to reproduce this issue: CLI: cordova start my_project cordova plugin add cordova-plugin-media cordova platform add android cordova build android www/index.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4