BigBlueButton URL is not loading in Android WebView

Viewed 388

I've a requirement in one of my Apps which opens the BigBlueButton link in a WebView. The URL is:

https://bbb.odin-health.com/bigbluebutton/api/join?fullName=Testdevice&meetingID=1600182496839&password=5FvAjuRt&checksum=b315e70fdabd4f3b56a1e33e500d0d259290653c

When tried to load this url in webview it shows a White or Blank page. Here is the code

WebSettings webSettings = webview.getSettings();
    webview.setWebViewClient(new MyWebViewClient());
    webSettings.setSupportZoom(true);
    webSettings.setBuiltInZoomControls(true);     
  

    webSettings.setUserAgentString("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Safari/537.36");
    webSettings.setSupportMultipleWindows(true);
    webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
    webSettings.setPluginState(WebSettings.PluginState.ON);
    webSettings.setAppCacheMaxSize( 10 * 1024 * 1024 );
    webSettings.setAppCacheEnabled(true);
    String appCachePath = getActivity().getCacheDir().getAbsolutePath();
    webSettings.setAppCachePath(appCachePath);

    webSettings.setAllowFileAccess(true);
    webview.setLayerType(View.LAYER_TYPE_HARDWARE, null);
    webSettings.setMixedContentMode(
            WebSettings.MIXED_CONTENT_ALWAYS_ALLOW );

    webSettings.setJavaScriptEnabled(true);
    webSettings.setMediaPlaybackRequiresUserGesture(false);


    webview.setWebChromeClient(mSWWebChromeClient);

    webview.loadUrl(getArguments().getString(Constants.BIGBLUEBUTTON_URL));

Am I missing something there?. The same url is working in Device's Google Chrome.

This is Logcat error log:

W/AudioCapabilities: Unsupported mime audio/mpeg-L1
W/AudioCapabilities: Unsupported mime audio/mpeg-L2
W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
W/VideoCapabilities: Unrecognized profile/level 32768/64 for video/mp4v-es
 I/OpenGLRenderer: Initialized EGL, version 1.4
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
W/OpenGLRenderer: load: so=libhwuibp.so
    dlopen failed: library "libhwuibp.so" not found
W/OpenGLRenderer: Initialize Binary Program Cache: Load Failed
W/VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
W/VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
E/OpenGLRenderer: allen debug liyu Key: 1
E/OpenGLRenderer: allen debug liyu Key: 3
W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.

Thanks

2 Answers

For Android

Check this answer here

For iOS and Swift

Check this answer here

android webview sends request with user agent is not fits bbb default configurations. in bbb documents. Check /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml, where you'll see the browser (from the User Agent string) and the minimum version. add your webviews version there.

Related