can model-viewer used in android? i have CORS-restricted problem. #2197
Replies: 2 comments 8 replies
-
@whitebird101 yes, we absolutely can be used on Android. However, you must work within the sandboxing rules of the browser, and this includes cross-origin restrictions. My recommendation is to run a local web server and host For CORS issues related to serving models, I would also recommend referring to the discussion here: #1015 |
Beta Was this translation helpful? Give feedback.
-
@cdata thanks for your reply!But, specific to my project, in many cases, there is no network support, no WIFI. so, my app must run locally。in this case, i want know that can model-viewer.js be used on Android? without any local web server or host. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
can model-viewer.js used in android app?
when i try use model-viewer.js in my android app, and Access the JS file from local file system.
the following error occurs:
I/chromium: [INFO:CONSOLE(0)] "Access to Script at 'file:///android_asset/model-viewer.js' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.", source: file:///android_asset/test.html (0)
what can i do if i want use this js in android app?
Beta Was this translation helpful? Give feedback.
All reactions