capacitor-voice-recorder icon indicating copy to clipboard operation
capacitor-voice-recorder copied to clipboard

On iOS 15.5 plugin returns empty recordDataBase64 and msDuration: 0

Open goranlisak opened this issue 2 years ago • 1 comments

Hello @tchvu3,

I have noticed that on iOS 15.5 the stopRecording method returns empty recordDataBase64 value and msDuration: 0. The same code works well on iOS 12.5.5

Could you please check?

Edit: I'm using the latest version of the plugin: 2.2.0

goranlisak avatar Jul 17 '22 21:07 goranlisak

If anyone is having a similar issue, the problem is caused by an HTML5 video playing while you try to record an audio (even if the video is muted).

In my case, I had a sound animation in a video format. Converting it to a GIF fixed an issue.

I'll leave it open for a maintainer to check if this can be fixed, as it's something that used to work before.

goranlisak avatar Jul 18 '22 21:07 goranlisak

@goranlisak @tchvu3 any solutions ?

khaled-elrifaay avatar Jan 12 '23 14:01 khaled-elrifaay

I've tried really hard right now to recreate this issue but it seems to to work correctly no matter what I try. can you please provide more info? what EXACTLY are you doing when you get this empty response? I've tried regular recording, I've tried to record while video is playing, but they all seems to be just fine.

tchvu3 avatar Jan 12 '23 19:01 tchvu3

@tchvu3 normal calling too "capacitor-voice-recorder": "^4.0.1",

Screenshot 2023-01-13 at 1 18 45 AM Screenshot 2023-01-13 at 1 17 44 AM

khaled-elrifaay avatar Jan 12 '23 23:01 khaled-elrifaay

Can you give me a minimum amount of code that have this issue? Maybe a small piece of your code that I can run and debug

tchvu3 avatar Jan 13 '23 08:01 tchvu3

@tchvu3 this is a sample code for new project and didn't work also.

https://github.com/khaled-elrifaay/test-record/tree/master now getting this error : on start : {"errorMessage":"CANNOT_RECORD_ON_THIS_PHONE"} on end : Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

khaled-elrifaay avatar Jan 13 '23 12:01 khaled-elrifaay

I've run the code you provided, it seems to work perfectly fine for me. would you mind to provide several more details:

  • which xcode version are you using?
  • are you using simulator or physical device?
  • is your ios version is 15.5? (making sure)
  • do you always get wrong result or sometimes its working correctly?

tchvu3 avatar Jan 14 '23 21:01 tchvu3