tchvu3 / capacitor-voice-recorder

Capacitor plugin for voice recording
69 stars 57 forks source link

On iOS 15.5 plugin returns empty recordDataBase64 and msDuration: 0 #23

Closed goranlisak closed 1 year ago

goranlisak commented 2 years ago

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 commented 2 years ago

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.

khaled-elrifaay commented 1 year ago

@goranlisak @tchvu3 any solutions ?

tchvu3 commented 1 year ago

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.

khaled-elrifaay commented 1 year ago

@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
tchvu3 commented 1 year ago

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

khaled-elrifaay commented 1 year ago

@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

tchvu3 commented 1 year ago

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