How to avoid video stop when I scroll the screen u

2019-06-13 06: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条回答
仙女界的扛把子
2楼-- · 2019-06-13 06:43

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

查看更多
登录 后发表回答