-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There should be a friendly error when calling createCapture
with no webcam
#6402
Comments
We can have something like "No webcam found on this device" instead of the current error message to let the users know that the code is working fine but there is simply no webcam to capture video from. |
Thanks @lindapaiste and @ayushanand308. I'm inviting the FES GSoC contributor @Ayush23Dash and mentors @almchung @nbriz to this discussion. |
Yup, I agree with @ayushanand308 and believe so that we can add an error for the same, also it would be great if we add one more error for Camera Permission denied. |
Thanks @Ayush23Dash! What do you think, @almchung and @nbriz? |
@Ayush23Dash Should I begin working on this and submit a pull request? |
Thanks @ayushanand308 for the follow up. Please go ahead and submit a PR. |
I agree with this. For the permission denied error may I suggest the following: "Camera detected but permission to it has been denied." |
Hii everyone, I am just a beginner to open source. I know a bit of javascript but still learning. I would like to address this issue , could you please help me through the process?! |
Hi @Garima3110. Below are three contributor documentation that you might find helpful: I will suggest going through the three docs and leave comments here if you have any questions. We are in the process of updating our contributor documentation, so please feel free to let us know how we can improve the docs to make it easier for contributors to get started. Thank you! |
I think in this case we just need to check for the condition : @Ayush23Dash It would be great if you could tell me whether I am going in the right direction or not?! |
@Garima3110 The line of code you provided is a standard JS error throw statement, and it will result in a regular error being thrown, not a friendly error. I also think that you would have to make changes in translation.json files. @Ayush23Dash Also in which existing category of friendly error should this fall, or we should add a new category like "_nodeviceFoundError()"? |
Since there isn't much update i would like to work on this issue |
Increasing Access
It can be confusing if a user is looking at an example code which doesn't do anything.
Most appropriate sub-area of p5.js?
Feature enhancement details
When I call
createCapture(VIDEO)
on a device which does not have a webcam, I see a message in the console which is not particularly friendly.This is actually not an error.
createCapture
still returns ap5.Element
.This example code will run with no webcam, it just won't do anything -- it creates a transparent image.
Other examples on the reference page do have errors.
The text was updated successfully, but these errors were encountered: