3D開發-AR.js 安卓-WebView支持AR.js

WebRTC支持java

報錯:Webcam Errorandroid

navigator.mediadevices.getusermedia not present in your browsergit

 

解決辦法:github

// 從新WebChromeClientweb

public class MWebChromeClient extends WebChromeClient {api

    /**ide

     * 支持WebRTCui

     * @param requestspa

     */ci

    @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證書報錯問題

報錯:TAG: X509Util - Failed to validate the certificate chain

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

解決辦法:

// 從新WebViewClient

public class MWebViewClient extends WebViewClient {

    /**

     * 解決SSL證書錯誤問題

     * @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

相關文章
相關標籤/搜索