Javascript 使用谷歌硬纸板播放/暂停Webview中的Android VR视频

Javascript 使用谷歌硬纸板播放/暂停Webview中的Android VR视频,javascript,android,html,video,google-cardboard,Javascript,Android,Html,Video,Google Cardboard,我一直在使用谷歌纸板API在Android上播放VR视频 视频播放做得很好。但是,无法控制播放和暂停 这里是我的源代码 这是android活动的源代码 public class RecodeActivity extends AppCompatActivity { public String VideoUrl; public String file; public WebView webView; private boolean isStart = fals

我一直在使用谷歌纸板API在Android上播放VR视频

视频播放做得很好。但是,无法控制播放和暂停

这里是我的源代码

这是android活动的源代码

public class RecodeActivity extends AppCompatActivity {
     public String VideoUrl;
     public String file;
     public WebView webView;
     private boolean isStart = false;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         setContentView(R.layout.activity_recode);
         file= getIntent().getStringExtra("file");
         VideoUrl = "****";    //url



         webView = (WebView) findViewById(R.id.webView);
         webView.setWebChromeClient(new WebChromeClient());
         webView.loadUrl(VideoUrl);

         webView.getSettings().setJavaScriptEnabled(true);
         webView.getSettings().setSupportZoom(false);
         webView.getSettings().setBuiltInZoomControls(false);
 }
这是HTML源代码

<!DOCTYPE html>
<html>
    <head>
        <title>And, This is HTML Source Code </title>
        <meta name=viewport content="width=device-width, initial-scale=1">
        <meta charset="utf-8" />
        <link href="//fonts.googleapis.com/css?family=Lora|Open+Sans" rel="stylesheet" type="text/css">
        <link href="../style.css" rel="stylesheet" type="text/css">
        <style>
        </style>

    </head>

    <body>

        <iframe width="100%" scrolling="no" allowfullscreen src="../../index.html?image=examples/pano/andes_2048.jpg&is_stereo=true&preview=examples/pano/andes_512.jpg"></iframe>

    </body>
</html>

这是HTML源代码
iframe标记的src属性的实现编码如下

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>VR view</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <meta name="mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <div id="error" class="dialog">
            <div class="wrap">
                <h1 class="title">Error</h1>
                <p class="message">An unknown error occurred.</p>
            </div>
        </div>

        <a id="watermark" target="_blank">
            <img src="images/ic_info_outline_black_24dp.svg"/>
        </a>

        <script src="build/vrview-analytics.min.js"></script>
    </body>
</html>

虚拟现实视图
错误
发生未知错误

你能告诉我虚拟现实视频控制是可能的,如果可以,如何控制这个

请帮帮我!提前谢谢