AR in webview

I found few discussion about AR in this forum. And I know corona doesn’t support AR at the moment (and most likely won’t happen in the future I think).

However, I found AR.js (links) which support AR in purely javascript. I am thinking can this be a workaround to implement AR in Corona by using corona webview. I want to know if the corona webview support webRTC in both iOS and Android?

Our web views are pretty basic. If there are some special features that need to be turned on, it’s likely not been done since we really haven’t done much more than occasional bug fixes to web views.

Rob

ok. I tried to deploy a test on Android using native webview to load the AR.JS sample page. But it said “Webcam Error” when I open the app on android.

here is code on my testapp

local web = native.newWebView( display.contentWidth \* 0.5, display.contentHeight \* 0.5, display.contentWidth, display.contentHeight ) web:request('https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html')

Permission added to the build.settings

    android =     {         usesPermissions =         {             "android.permission.INTERNET",               -- WebView             "android.permission.CAMERA",                 -- Camera             "android.permission.WRITE\_EXTERNAL\_STORAGE", -- Camera         },     },

Error show when I open the app on Android

The page at "https://jeromeetienne.github.io" says: Webcam Error Name: PermissionDeniedError Message:

So, this can not be fixed due to limitation?

I honestly have no idea if our webView’s can open the camera. You’re using a third-party module that we have no experience with. At this time, our engineering team is working on other things that are more important than adding features to webViews like HTML5 support and native builds for Windows developers. If you can get this working, great. I hope you can get it working.  

Rob

I don’t have any idea on how to get it work. But thanks for the reply. 

Our web views are pretty basic. If there are some special features that need to be turned on, it’s likely not been done since we really haven’t done much more than occasional bug fixes to web views.

Rob

ok. I tried to deploy a test on Android using native webview to load the AR.JS sample page. But it said “Webcam Error” when I open the app on android.

here is code on my testapp

local web = native.newWebView( display.contentWidth \* 0.5, display.contentHeight \* 0.5, display.contentWidth, display.contentHeight ) web:request('https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html')

Permission added to the build.settings

    android =     {         usesPermissions =         {             "android.permission.INTERNET",               -- WebView             "android.permission.CAMERA",                 -- Camera             "android.permission.WRITE\_EXTERNAL\_STORAGE", -- Camera         },     },

Error show when I open the app on Android

The page at "https://jeromeetienne.github.io" says: Webcam Error Name: PermissionDeniedError Message:

So, this can not be fixed due to limitation?

I honestly have no idea if our webView’s can open the camera. You’re using a third-party module that we have no experience with. At this time, our engineering team is working on other things that are more important than adding features to webViews like HTML5 support and native builds for Windows developers. If you can get this working, great. I hope you can get it working.  

Rob

I don’t have any idea on how to get it work. But thanks for the reply. 

Guys any luck? I need camera permissions to webView for QR Code scan…