Re: Implementing an iOS podcast playback app
Re: Implementing an iOS podcast playback app
- Subject: Re: Implementing an iOS podcast playback app
- From: Rick Mann <email@hidden>
- Date: Mon, 10 Nov 2014 13:00:35 -0800
Thanks, Yuriy.
Does this make it hard to allow the user to jump to different parts in the file? These are finite-length podcast episodes. In Apple's podcast app, they start playing almost immediately, but I can drag the playback position to anywhere in the file, and it will pick up from that location. I'm not sure how that's actually implemented, perhaps using range requests over HTTP when fetching the stream?
> On Nov 10, 2014, at 02:30 , Yuriy Romanchenko <email@hidden> wrote:
>
> Hi Rick,
>
> Try to use Audio File Stream Services.
> I suggest you to create component that is responsible for providing chunks of data from specified URL.
> You will parse these audio chunks using Audio File Stream Services.
> General purpose of these services is to produce raw audio packets.
> Stream services will provide you with information about this song, which you can use to create AudioQueue.
> After you receive audio packets you simply pass them to AudioQueue and let it handle the rest.
>
> Here you can find Apple documentation about those services:
> https://developer.apple.com/library/mac/documentation/MusicAudio/Reference/AudioStreamReference/index.html
>
> Regards,
> Yuri.
>
> On Nov 10, 2014, at 11:33, Rick Mann <email@hidden> wrote:
>
>> Given a URL to an online MP3 file, what's the right API to use to start playing it back during download?
>>
>> I want my app to download the file and play it locally, but I'd like it to start playing shortly after download begins. What's the most modern API to handle this? Is it enough to just start an async download to a file, and then start up playback of the local a few seconds or some number of bytes transferred later? Or is there a streaming API that also writes the bytes to disk?
>>
>> I plan to let my users download without playing back, so they can store podcasts for offline playback. I can write two different code paths for these two uses, but I'd rather have one bit of download code and one bit of playback code.
>>
>> Appreciate suggestions. Thanks!
>>
>> --
>> Rick Mann
>> email@hidden
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden