I\'m building out an audio media recorder/player with PhoneGap. It\'s all working beautifully, but I\'ve hit a wrinkle I can\'t seem to iron.
my_media.play();>
I also faced similar problem in cordova for iOS. I was successfully able to record, play and stop audio but unable to get current position and total duration for audio file. So I added my_media.release()
just after I was done finishing recording audio i.e. after my_media.stopRecord()
and it worked like a charm. Earlier I was getting -1
for getDuration()
and 0
for getCurrentPosition()
.
Hope it helps someone.