Webviewer showing webcam error

I am trying to execute augumented reality usin appinventor.
WebviewUrl used:https://kdlp7lyora5wk2yktd8bzq-on.drv.tw/ARWorks/imran.html

Showing webcam error.
Name:NotAllowedError
Messae:Permission denied
Please guide to solve

I think you will have to ask for Camera permission on startup.
This can be helpful:

Hello Akash

The site might not recognise a smartphone camera as webcam. Also, App Inventor only provides a picture taking facility, so even if it was recognised as a webcam by the website, it isn't recognised as such by App Inventor.

If you don't mind the extra hardware, you can add a webcam (on an ESP32 board) which can then be used by App Inventor via Bluetooth.

Alternatively, it might be possible to write an App Inventor extension to use the smartphones camera as a webcam.

1 Like

Actually i have read one marker from camera and pass to the given code.

Hi Akash

Actually i have read one marker from camera and pass to the given code.

I have no idea what you mean. :upside_down_face:

Can you share your line of code

Hi Akash

We are losing something in translation I fear - there is no code to be shared.

How did you read the marker and pass to your code in appinventor?

:upside_down_face:
I do not have a marker, I do not have any code

OK...thanks

I am facing problem during implementation of marker based Augmented reality using AR.js and a-frame.
Guide me.

Hi..
I am able to exexute this html code in chrome browser as .HTML file.
But when I am trying to excite this file in webviewer or open the HTML file in external browser using activity starter they where showing webcam error.
Code:

<!doctype HTML>
<html>
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://raw.githack.com/jeromeetienne/AR.js/2.0.8/aframe/build/aframe-ar.js"></script>
  <body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>
      <a-marker preset="hiro">
          <a-box position='0 0.5 0' material='color: yellow;'></a-box>
      </a-marker>
      <a-entity camera></a-entity>
    </a-scene>
  </body>
</html>

Hiro Marker in attachment.

I am referring this URL to develop AR:
https://connected-environments.org/making/ar-playing-cards/

Please guide.

Hi @AKASH_MANDAL
Please give more info like blocks so that we can help you.

Calling HTML asset to open in external browser using activity starter or
Directly given asset address to webview URL.

You can't open html file from asset in browser.

Show your blocks please.

How to read a HTML page stored as asset inside of App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

@Taifun
I tried in same fashion it was mentioned in your website but showing error message given below.
Showing webcam error.
Name:NotAllowedError
Message:Permission denied
Please guide to solve

I guess, it is the access to the camera then...
and after doing a search here in the community I find another thread from you with the same question...

which makes me feel as I wasted my time now... bye

Taifun
PS: I now merged these 2 threads...
thank you for wasting my time... (sarcasm)

Sorry ...

I knew I repost my query with full code...but still I m not getting bow to resolve the issue mentioned above...

The built in web viewer does not support getting access to the camera at this time. We do have a pending implementation though that I'm hoping to get into the next release:

1 Like