黑补丁的YouTube的Android API [英] Black patch youtube android api
问题描述
我已经实现了YouTube播放器API为Android,当我把YouTube播放器滚动视图内并开始播放视频,那一刻我暂停视频和滚动屏幕上下有黑补丁吧。
我不明白为什么黑补丁过来?我试图捕捉屏幕,但屏幕截图中没有黑色的补丁。
下面是我的code:
< com.google.android.youtube.player.YouTubePlayerView
机器人:ID =@ + ID / youtube_view
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
/>
黑色补丁出现,因为视频观看使用SurfaceView。真正的观点是一个黑洞,而视频是由下面垫硬件。任何直接操纵的视图布局导致此观点堆叠到失步:你其实看到Android的内衣,你会看到不同的手机/平板电脑有不同的反应,例如在我的旧银河标签这样的效果是非常明显的,而新的,更快的亚马逊的Kindle做的更好的工作。
还有,你可以做些什么。这与Android的图形内部,他们需要修复的发动机,以便更好地滚动surfaceviews的。
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.
这篇关于黑补丁的YouTube的Android API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!