cordova-plugin-media-capture
cordova-plugin-media-capture copied to clipboard
Prevent audio recording from getting stuck
Swiping away the recording modal on iOS 13 causes the plugin
- to never stop in the background
- never to call any callback
- to prevent you from starting another recording
This commit disables the swiping action.
Platforms affected
iOS
Motivation and Context
This is a temporary fix to avoid https://github.com/apache/cordova-plugin-media-capture/issues/151
Description
Using the isModalInPresentation
prop of the UIViewController, I've disable the swiping action.
Testing
This has only been tested on an iOS 13 iPhone 6S. The test was to try and dismiss the recording modal with a swipe. The recording modal was opened by running
navigator.device.capture.captureAudio();
in a javascript console.
Checklist
- [x] I've run the tests to see all new and existing tests pass
- [] I added automated test coverage as appropriate for this change
- [ ] Commit is prefixed with
(platform)
if this change only applies to one platform (e.g.(android)
) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
- [x] I've updated the documentation if necessary
Hi, when you plan to merge in master?
Thanks
Hi, To echo @Pazkov it would be great to get this merged into master at some point.
I agree with @Pazkov and @StevenConradEllis .
Hi! It is a real problem, march 2021 still not merged, please do it
Audio modal dismissing is also fixed through PR #186 : better than this one described as a temporary fix
?
Resolved by #278 which is a rebase of #186