I have implemented youtube player api for android, when I put youtube player inside the scrollview and start the video, the moment I pause the video and scroll the screen up and down it has black patch with it.
I could not get why the black patch is coming over?I tried to capture the screen but the screenshot does not have the black patch.
Below is my code :
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
the black patch appears because the video view uses a SurfaceView. The real view is a "black hole" and the video is underlaid by hardware. Any direct manipulations to the view layout cause this view stacking to desynchronize: you are in fact seeing Android's underwear, and you will see that different phones/tablets react differently, for example in my older galaxy tabs this effect is very noticeable, while the newer, faster Amazon Kindles do much better jobs.
There's nothing you can do about it. This is related to Android's graphic internals, they need to fix the engine to allow better scrolling of surfaceviews.
来源:https://stackoverflow.com/questions/19145799/black-patch-youtube-android-api