Android安卓平台上网页WebView中全屏横屏播放html5视频的实现

可以实现在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

欢迎关注我的微信公众号:

 

如无特殊说明,文章均为本站原创,转载请注明出处!

发表回复

您的电子邮箱地址不会被公开。