How to avoid video stop when I scroll the screen using youtube API in an android app?

怎甘沉沦 提交于 2020-01-03 04:33:11

问题


I'm building an app for Android using the YouTube API. The video is in a scroll widget, and when I scroll and the video goes up or down the screen, it stops. I want the video to continue even though isn't in the screen. How can I do that?


回答1:


i went through the same problem, i open this question:

Android YouTube API video pause when rotate screen or hide player

see the comments to understand better. For the tests I did, the Youtube API knows when the player is not showing on the screen and just pause the video. As a workaround I changed my layout so that the player be fixed on the screen, just as is the official app from youtube.

I use this question as reference: Scrolling Text Above Buttons, Buttons Fixed At Bottom



来源:https://stackoverflow.com/questions/19614862/how-to-avoid-video-stop-when-i-scroll-the-screen-using-youtube-api-in-an-android

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