可以实现在WebView中全屏横屏播放html5视频,但是没办法播放的时候直接进入全屏,因为监听不到播放事件。如果有兴趣可以考虑使用点击事件的监听来曲线救国。
废话不多说,具体实现代码实例参考我的github:https://github.com/deaboway/VideoEnabledWebView
参考:
https://stackoverflow.com/questions/15768837/playing-html5-video-on-fullscreen-in-android-webview/16179544#16179544
https://stackoverflow.com/questions/19452299/catching-play-video-event-in-android-webview
https://stackoverflow.com/questions/26037801/intercepting-html5-video-play-event-in-android-web-view
https://stackoverflow.com/questions/3815090/webview-and-html5-video
https://stackoverflow.com/questions/23284537/capture-play-event-from-mediaplayer-on-webview
https://stackoverflow.com/questions/21873371/android-webview-video-to-play-in-mediaplayer
https://gist.github.com/benvium/5907542
http://briancrescimanno.com/droidfix/
https://www.oschina.net/question/233367_37207