2

I am trying to load the following URL in an Android Webview

URL : http://storage.net-fs.com/hosting/2727323/5/index.htm

The following is the output in a WebView

WebView Loaded as expected

When clicked on the VR button from top right, I am expecting the below. Which when turned to landscape, plays the video in Stereo mode. This is Working fine as expected, when opened the url in Google Chrome(mobile).

Expecting this promptExpected stereo mode

But for me, the video is not playing in VR mode(stereo mode). The following is shown when clicked on VR button.

Actual output

This is my code

    WebSettings webSettings = webView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
    webSettings.setLoadsImagesAutomatically(true);
    webSettings.setDomStorageEnabled(true);
    webSettings.setUseWideViewPort(true);
    webSettings.setAllowFileAccess(true);
    webSettings.setAllowUniversalAccessFromFileURLs(true);
    if (Build.VERSION.SDK_INT > 16) {
        webSettings.setMediaPlaybackRequiresUserGesture(false);
    }
    webView.setWebChromeClient(new WebChromeClient());
    webView.loadUrl("http://storage.net-fs.com/hosting/2727323/5/index.htm");

Please help me out in this.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

0 Answers0