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?
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