I am trying to make an app which can record online streaming audio
like Radio
and if person want they can save
that audio
in Local Document Directory
to listen in future.
Asked
Active
Viewed 620 times
-1

Nimantha
- 6,405
- 6
- 28
- 69

Gurinder Batth
- 655
- 9
- 18
-
[link](http://vombat.tumblr.com/post/86294492874/caching-audio-streamed-using-avplayer) https://github.com/calm/PersistentStreamPlayer https://rymc.io/2014/01/08/recording-live-audio-streams-on-ios/ – Gurinder Batth Dec 29 '16 at 08:18
-
Well, and what exactly is your problem with that? – Hermann Klecker Dec 29 '16 at 08:20
-
they only play audio not record – Gurinder Batth Dec 29 '16 at 08:21
-
1Did you try hugging into `connection:didRecevieData:` and store it locally? Or in `connectionDidFinishLoading:` where the cached data is already stored in files and store the full file additionally instead of the currently cached part only? – Hermann Klecker Dec 29 '16 at 08:30
-
i am trying these methods and give you feedback and thxx – Gurinder Batth Dec 29 '16 at 08:34
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/131798/discussion-between-gurinder-batth-and-hermann-klecker). – Gurinder Batth Dec 29 '16 at 12:07
1 Answers
0
There is not an API in iOS to do this.
You can save an audio stream (provided it is a completed file), but live streams are not as easy because they technically have no end. So the issue is they download forever.
Livesteams also can't be 'recorded' while playing either, due to the design of the iOS audio API.
You could however develop a library which allows you to "tap into the data stream" which is being downloaded and save it on demand. This is not a trivial task, but it can be done.

Community
- 1
- 1

Joshua Briefman
- 3,783
- 2
- 22
- 33