google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.69k stars 798 forks source link

AR Rendering Issue on First-Time Camera Permission Grant on Android Devices #4663

Open fabiocaires opened 5 months ago

fabiocaires commented 5 months ago

Description

I'm encountering an unusual problem with my augmented reality implementation. Specifically, the issue arises when attempting to render an object after granting camera permissions to the browser on Android devices. On the first attempt to initiate the AR feature (which prompts the request for camera permissions), the object fails to render. Interestingly, subsequent attempts do not present this issue, and the AR feature works as expected once camera permissions have already been granted. This problem only seems to occur after performing a factory reset on the device, after which the augmented reality feature launches to a completely blank screen.

I am presently utilizing the library '@intelligentgraphics/ig.ar' to initiate Augmented Reality (AR) across various devices. This library, which can be found at https://www.npmjs.com/package/@intelligentgraphics/ig.ar, it provides several methods and automatically opens the appropriate file extension based on the device in use.

AR Modal Link: https://www.xxxlutz.at/p/linea-natura-schreibtisch-120-65-76-cm-in-wildeiche-002748005501?ARRedirected=true Please note that this link should be opened on an Android device where Chrome has not yet been granted camera permissions.

Live Demo

Screen1

Version

Browser Affected

OS

AR

Utils.mjs that opens the scene viewer https://www.npmjs.com/package/@intelligentgraphics/ig.ar?activeTab=code (line 78)

elalish commented 5 months ago

Looks like a Scene Viewer bug.