Play audio from a Music Video using Youtube API in android, when my app is minimized

这一生的挚爱 提交于 2019-12-04 09:40:14

From my understanding, the activity will pause when it goes to the background. Please refer to android activity life cycle.
When the activity goes to pause state, the video and audio linked with it will pause.
You will need a service to stream the audio in the background. And that's where it gets complicated.
Streaming audio inside a Service is a very easy task. The tough part is how to extract the audio from the video, and from this forum Youtube API is not keen on it.
The application PVStar+ does what you are looking for. But I have to figure out how they did it.

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