iFrame allowFullScreen属性不为';无法在Android WebView上工作

iFrame allowFullScreen属性不为';无法在Android WebView上工作,android,iframe,webview,youtube,fullscreen,Android,Iframe,Webview,Youtube,Fullscreen,我需要在我的Android项目中显示YouTube视频列表,当我点击视频时,它应该以全屏模式启动。我使用了一个WebView,正如其他主题中建议的那样,带有来自html的iFrame,但是“allowFullScreen”属性不起作用 我尝试了allowFullScreen,allowFullScreen=“true”,allowFullScreen=allowFullScreen方法 String frameVideo = "<html><body><iframe

我需要在我的Android项目中显示YouTube视频列表,当我点击视频时,它应该以全屏模式启动。我使用了一个WebView,正如其他主题中建议的那样,带有来自html的iFrame,但是“allowFullScreen”属性不起作用

我尝试了allowFullScreen,allowFullScreen=“true”,allowFullScreen=allowFullScreen方法

String frameVideo = "<html><body><iframe width=\"300\" height=\"300\" src=\"https://www.youtube.com/embed/47yJ2XCRLZs\" scrolling=\"no\" frameborder=\"0\" allowFullScreen=\"allowFullScreen\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"></iframe></body></html>";

    for(int i=0; i<number_of_videos; i++){
        video = new WebView(this);
        video.getSettings().setJavaScriptEnabled(true);
        video.getSettings().setPluginState(WebSettings.PluginState.ON);
        video.loadData(frameVideo, "text/html", "utf-8");
        video.setWebChromeClient(new WebChromeClient());
        video.setId(i);
        video.setPadding(0, 0, 0, 0);
        video.setLayoutParams(new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, 900));
        root.addView(video);
    }
String frameVideo=”“;

对于(int i=0;i而不是allowFullScreen=“allowFullScreen”只需使用

<iframe 
width="300" 
height="300" 
src="https://www.youtube.com/embed/47yJ2XCRLZs" 
scrolling="no" 
allowFullScreen > 

allowFullScreen不带任何值