Please how do I gain access to a webcam using wix code or iframe?

@onemoretime Yes the camera came on but Yisreal’s code did not attach the camera to the html and another html code that is meant to trigger the camera and attach it on button click returned the error

camera came on!! :slight_smile:

@onemoretime But what is the point of the camera coming on if it cannot be attached to wix html or cannot be called by a button in wix html component?

@onemoretime Do you have the code for attaching the camera in wix?

@chidiejike Try limiting the HTML element to one and using getUserMedia () only once. I think it will not be called if you call it once before in another HTML so it can’t call again with the button.

I have not even gotten to that point, I am just tying to load the camera immediately the page loads but the camera is still not attaching to the html component. When this works then I can try to call with a button

@chidiejike Please show me again your HTML code you just trying to work. And make sure it’s the only HTML on the page.

@onemoretime I used your last code in the wix custom code in the dashboard the used Yisreal last code for my html compnent

How do we make this work in mobile browsers? This works on Chrome Desktop but not on Chrome

You guys should stop misleading people this solution does not work, it has never worked, no point as tagging it as “SOLVED”, rather it should be tagged “UNSOLVED”.

@chidiejike hey, I noticed we can use navigator.mediaDevices.getUserMedia() in the Custom Element.

from this article.

I referred to J.D.'s advice. I hope this will help you!

Is there any video on how to use this custom element? Knowing fully well that the html enbed has massive limits, why can’t wix just create a video on how to transfer your html,js,css in the html embed to custom element?

This worked for me. Thank you!