播放MP3文件,而下载? [英] Play mp3 file while downloading?

查看:168
本文介绍了播放MP3文件,而下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的Andr​​oid应用程序从互联网上下载一个MP3文件并播放它像一个流,同时下载。这甚至可能吗?我怎么会去这样做呢?

I'd like my Android application to download an mp3 file from the internet and play it like a stream while downloading it. Is this even possible? How would I go about doing it?

基本上我希望用户能够收听即时的文件,但它保留下载到,即使他停止听的SD卡,所以整个MP3文件最终会在SD卡两种方式。

Essentially I want the user to be able to listen to the file instantly, but have it keep downloading to the SD Card even if he stops listening, so the whole mp3 file will end up on the SD Card either way.

推荐答案

有关Android设备2.3和更早版本,你需要完全删除内容处置响应头。这将导致浏览器调用的用户的preference音频播放器。

For Android devices 2.3 and earlier, you need to remove the Content-Disposition response header altogether. This will cause the browser to invoke the audio player of the user's preference.

尝试在这里: http://declinefm.com/archives 选择您所选择的档案,然后点击下载链接。

Try it here: http://declinefm.com/archives select an archive of your choice, and tap the download link.

有关现代的Andr​​oid设备,你可以去除CD标题的分配。

For modern Android devices, you can dispense with the removal of the CD header.

我有一个教程在这里,我写的启发您的文章:

I have a tutorial here that I wrote inspired on your post:

<一个href="http://rudd-o.com/linux-and-free-software/how-to-properly-stream-audio-from-your-plone-varnish-site" rel="nofollow">http://rudd-o.com/linux-and-free-software/how-to-properly-stream-audio-from-your-plone-varnish-site

享受!

这篇关于播放MP3文件,而下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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