Play Video Inside Webview

回眸只為那壹抹淺笑 提交于 2019-12-12 04:47:16

问题


I have created an simple application which loads the HTML page in webview(contains js,css) which has the video play. When we run the the APK file in mobile, the video runs inside the webview. But when We install the same APK inside the Google TV, and play the video , it plays in other player instead inside the webview.


回答1:


Google TV devices utilize what is called "Trusted Video Path" technology. The implication of this is that there is a different media playback stack on Google TV vs an Android phone or tablet. WebView on Google TV is not going to support video playback the way you want. If you are building a web application for TV that plays video then I would recommend creating an android application that launches Chrome with your site being provided in the intent extras. If you are keen on building an Android app for Google TV then the recommendation is to use a VideoView for playback of the content. There is currently no good way to mix HTML5 apps and Android apps in the same interaction space without it being a hack that wont work consistently.



来源:https://stackoverflow.com/questions/16910802/play-video-inside-webview

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!