pagano commented on issue #177:
URL: 
https://github.com/apache/cordova-plugin-media/issues/177#issuecomment-733162388


   > I have a solution to get the correct duration after recording on iOS:
   > 
   > After below line:
   > 
   > 
https://github.com/apache/cordova-plugin-media/blob/b1c135342619f773fee3e8693a46992a133efd56/src/ios/CDVSound.m#L777
   > 
   > Add:
   > 
   > ```objc
   >         [self prepareToPlay:audioFile withId:mediaId];
   >         double duration = round(audioFile.player.duration * 1000) / 1000;
   >         [self onStatus:MEDIA_DURATION mediaId:mediaId param:@(duration)];
   > ```
   
   Nice catch zhang! I don't know how to do it, but a pull request for this 
would be great


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to