Is it possible to overlay some views on YouTube Android Player?

二次信任 提交于 2019-12-02 05:08:46

问题


I want to use my media controller instead of build-in one of YouTube Android Player. So, I have put some views overlapped YouTube Android Player. However, I got a problem which is it always pauses automatically after played one second. Therefore, is it possible to overlay some views on YouTube Android Player?


回答1:


Youtube deliberately prevent any attempt at displaying anything on top of their player. As soon as it detects this the playback will pause. This blocks the growth of a whole industry of video meme players :( One main reason for this could be to prevent the obvious attempt at competing with Google for advertising space and other imaginable features that capitalize on video material published by users.

The YouTube provided player is intended to be the only possible path to accessing Youtube content. The initial (now deprecated) Youtube API was much more liberal and allowed listing of all encoded quality versions of a clip and direct streaming of it to your own VideoView based player. This was an open path to all kinds of misuse and violations so they scrapped that in favor of a controlled solution where the Youtube player is the gateway that control how playback can occur.

The new API at least allows the player to be controlled such as seeking to a specific position and to query current position. For some apps that is hot enough a possibility for coming up with new end user value.



来源:https://stackoverflow.com/questions/20087147/is-it-possible-to-overlay-some-views-on-youtube-android-player

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