在WebView中加载YouTube视频时,全屏选项不可用 [英] Full screen option not available when loading YouTube video in WebView

查看:226
本文介绍了在WebView中加载YouTube视频时,全屏选项不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android应用程序中使用webview工作了很多次.但是这次我在将YouTube视频加载到WebView时遇到了一个奇怪的问题.

I have work so many time with the webview with in Android app. But this time I got strange issue with loading YouTube video in to WebView.

看,这是加载在Chrome浏览器中的YouTube视频的屏幕快照,其中具有全屏选项.

See, this is the screen shot of YouTube video loaded in Chrome browser, which have full screen option in it.

现在,下面是我的应用程序的屏幕截图,其中我在webview中加载了相同的视频.但是它没有全屏选项.

Now, below is the screen shot of my app in which I have loaded same video in webview. But it is not having that full screen option.

您可以在两个图像中看到更改.两个屏幕截图均来自同一设备.但是看起来还是不一样.

You can see the changes in both the images. Both the screen shots are taken from same device. But still it looks different.

我用于webView加载的代码是在此粘贴板上.

My code for webView loading is in this pasteboard.

我还看到相同的问题是在此处报告了.但是不知道是否有针对该解决方案的解决方案.

I have also seen that the same issue is reported here. But don't know whether is there solution for that available or not.

推荐答案

iFrame是一个选项,但您可以尝试

iFrame is an option but you can try this

启用了Android的WebView和WebChromeClient类扩展 完全有效的HTML5视频支持

Android's WebView and WebChromeClient class extensions that enable fully working HTML5 video support

VideoEnabledWebView

我还没有尝试过,但是希望对您有帮助.

I have not try this yet but hope will help to you.

这篇关于在WebView中加载YouTube视频时,全屏选项不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆