Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

[Android] fix: Error retrieving camcorder profile params #1835

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

polomani
Copy link
Contributor

@polomani polomani commented Oct 4, 2018

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.

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.
@polomani polomani changed the title fix: Error retrieving camcorder profile params [Android] fix: Error retrieving camcorder profile params Oct 4, 2018
Copy link
Collaborator

@jgcmarins jgcmarins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants