流音频文件从谷歌驱动器使用谷歌API驱动器在Android中发挥 [英] stream audio files to play from google drive using google drive api in android

查看:171
本文介绍了流音频文件从谷歌驱动器使用谷歌API驱动器在Android中发挥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用哪一个可以上传,下载,创建我要播放的音频文件在谷歌Drive.Now文件,这是在谷歌驱动器自定义音乐播放器(不下载,但流后)开发的Andr​​oid应用程序。
对于打我使用的音乐文件响应提供的链接的音频文件,如

I have developed an android app using which one can upload,download,create files on Google Drive.Now I want to play audio files (not after downloading but streaming )which are on Google Drive in custom music player. For playing audio files I'm using link provided in music file response such as

musicFile.getSelfLink()
musicFile.getAlternateLink()
musicFile.getSelfLink()
musicFile.getDefaultOpenWithLink()
musicFile.getWebContentLink()

我试着在response.But规定不能播放音乐file.It各个环节给了我这样的错误

I tried all links provided in response.But could not play music file.It gave me errors like

可以在客户端无法打开文件,试图服务器端或媒体播放器误差

Couldn't open file on client side, trying server side or media player error

请帮忙me.Am我失去了一些东西?
先谢谢了。

Please help me.Am I missing something? Thanks in advance.

推荐答案

与您的用户的访问令牌授权的 file.getDownloadLink()。您应该能够以流了。

Authorize the file.getDownloadLink() with your user's access token. You should be able to stream it.

这篇关于流音频文件从谷歌驱动器使用谷歌API驱动器在Android中发挥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆