3D development -AR.js Andrews -WebView support AR.js

WebRTC support

Error: Webcam Error

navigator.mediadevices.getusermedia not present in your browser

 

Solution:

// re WebChromeClient

public class MWebChromeClient extends WebChromeClient {

    /**

     * Support for WebRTC

     * @param request

     */

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)

    @Override

    public void onPermissionRequest(PermissionRequest request) {

        request.grant(request.getResources());

    }

}

Ref:

https://github.com/oauth-io/oauth-android/issues/2

 

 

HTTPS SSL certificate error problem

报错:TAG: X509Util - Failed to validate the certificate chain

error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Solution:

// re WebViewClient

public class MWebViewClient extends WebViewClient {

    /**

     * SSL certificate error problem solving

     * @param view

     * @param handler

     * @param error

     */

    @Override

    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

        handler.proceed();

    }

}

Ref:

https://stackoverflow.com/questions/22376202/camera-not-opening-in-webview

https://github.com/marcusbelcher/android-getUserMedia-test

 

 

WebView

https://github.com/Justson/AgentWeb

Guess you like

Origin www.cnblogs.com/zhen-android/p/11032778.html
Recommended