本文介绍了如何避免视频停止时,我滚动使用YouTube API在Android应用程序在屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建使用YouTube API的Andr​​oid应用程序。视频是一个滚动部件,当我进入滚动屏幕和视频去向上或向下的屏幕,它停止。我想,视频继续eventhough屏幕是没有的。我该怎么做?

I'm building an app for android using youtube API. The video is in a scroll widget, when I scroll into the screen and the video go up or down the screen, it stops. I want that the video continue eventhough isn't in the screen. How can I do that?

谢谢意见

推荐答案

我经历了同样的问题去了,我打开了这个问题:

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

Android YouTube的视频API时暂停

看评论更好地理解。因为我做了测试,Youtube的API当玩家没有显示在屏幕上,只是暂停视频知道了。作为一种变通方法,我改变了布局,使玩家可以固定在屏幕上,就像是来自YouTube的官方应用程序。

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.

我用这个问题作为参考:
Scrolling上面的文字按钮,固定在底部按钮

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

这篇关于如何避免视频停止时,我滚动使用YouTube API在Android应用程序在屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 04:44