Commits
Ivan Polomani authored and Sibelius Seraphini committed 8de827e6c2a
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.