This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Error retrieving camcorder profile params (#1835)
I got this error when I call `recordAsync(...)` with `quality: RNCamera.Constants.VideoQuality['480p']` on Samsung Galaxy Tab S 10.5. ``` Error: Error retrieving camcorder profile params at createErrorFromErrorData (NativeModules.js:123) at NativeModules.js:80 at MessageQueue.__invokeCallback (MessageQueue.js:400) at MessageQueue.js:139 at MessageQueue.__guardSafe (MessageQueue.js:316) at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:138) ``` It happens because there is no check if device actually supports given quality. To make the `CamcorderProfile.get(quality)` call safe we need to check if there is appropriate CamcorderProfile by calling `CamcorderProfile.hasProfile(quality))`. This PR fixes that issue.
- Loading branch information