fix: support video recording on iOS#308
fix: support video recording on iOS#308mario-deaconescu wants to merge 8 commits intocapacitor-community:masterfrom
Conversation
|
On Android, |
|
On iOS, |
…Android implementation
|
@alexandargyurov I fixed the mismatch between the return types. In what conditions does your camera turn off? From my testing, simply starting and stopping a recording does not stop the camera. If I display the video recording in the app, it stops, but that's because the video plays some audio, which causes the camera preview to pause until I hide the video again. This behavior does not happen if the video is muted, which leads me to believe that the audio playback is interfering with the audio recording part of the camera. In my opinion, this is a more general issue that does not concern this branch, but I might go look into it once/if this pr gets approved. |
Playing audio from within the WebView causes the capture session to stop and (sometimes) not resume automatically, so I added a method to manually resume the capture session without initializing the whole class.
CAPPluginCall.resolve() was being called before the camera actually resumed, so I used a completionHandler to wait for the async code
|
is it going to be merged? |
|
@mario-deaconescu Good job adding this feature! I used this as a patch until this gets merged and discovered small issue with video output. Recorded videos longer than 10 seconds had issues with audio, basically video was playing ok but audio was not playing at all for longer videos. After some research I found that this is the issue https://stackoverflow.com/questions/26768987/avcapturesession-audio-doesnt-work-for-long-videos. |
|
I will look into this issue but I can't make any promises as I've got other projects going on. If you can solve the problem before me, I can let you merge the changes. |
The mp4 format recorded in fragments of 10 seconds, so I disabled this option because there was no audio if the recording was longer than 10 seconds
|
I don't think changing the format of the video would have been a good option since |
Closes #307