1、添加网络访问权限
<uses-permission android:name="android.permission.INTERNET" />
WebChromeClient
.
For full screen support, implementations of onShowCustomView(View,
WebChromeClient.CustomViewCallback)
and onHideCustomView()
are
required, getVideoLoadingProgressView()
is
optional.2)重写WebChromeClient的onShowCustomView(View,
WebChromeClient.CustomViewCallback)
和onHideCustomView()
通过onShowcustomView对大屏的布局进行加载,隐藏小屏布局;在onHideCustomeView中退出全屏播放,重新显示小屏布局
参考:
http://developer.android.com/reference/android/webkit/WebView.html
android webview 通过html5播放在线视频 切换大屏,布布扣,bubuko.com
android webview 通过html5播放在线视频 切换大屏
原文:http://blog.csdn.net/actsai/article/details/38711735