小编use*_*473的帖子

iframe视频不会在Android网页视图中进入全屏模式

我目前正在开发基于网站的Android应用程序.iOS应用程序已经存在,我必须尊重一些代码以保持一致性.

一切都差不多完成了,但我刚刚发现了一个有趣的问题:当使用webview(我对显示的页面没有任何控制)的iframe视频页面(Youtube,Dailymotion)时,它不会全屏显示,即使我按下播放器的按钮.

我已经尝试了几乎所有在这里找到的东西,但它只涉及我知道你需要显示哪些页面的应用程序.

这是应用程序的webActivity部分的代码:

public class WebActivity extends Activity {
    String targetURL = "";
    String title = "";
    WebView wv;

    @Override
    public void onResume() { super.onResume(); CookieSyncManager.getInstance().startSync(); }
    @Override
    public void onPause() { super.onPause();  CookieSyncManager.getInstance().stopSync(); }

    /** Called when the activity is first created. */
    @SuppressLint("SetJavaScriptEnabled")
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().requestFeature(Window.FEATURE_PROGRESS);
        //getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        CookieSyncManager.createInstance(getApplicationContext());
        CookieSyncManager.getInstance().startSync();
        CookieManager.getInstance().setAcceptCookie(true);
        /**
         * TODO: WebView Cookie management.
         * Right now, a cookie is hardcoded here into the WebView instead of getting it from …
Run Code Online (Sandbox Code Playgroud)

iframe android fullscreen webview

15
推荐指数
1
解决办法
6385
查看次数

标签 统计

android ×1

fullscreen ×1

iframe ×1

webview ×1