简体   繁体   中英

iOS streaming audio from network — random access of a 6-hour file

A potential client has come to me asking for a an app which will stream a six hour audio file. The user needs to be able to set the "playback head" to any position along the file. Presumably, this means that the app must not be forced to download the entire file before it beings playing back starting at an arbitrary

An added complication -- there are actually four files which need to be streamed and mixed simultaneously.

My questions are:

1) Is there an out-of-the box technology which will allow me random access of streaming audio, on iOS? Can this be done with standard server technology and a single long file, or will it involve some fancy server tech?

2) Which iOS framework is best suited for this. Is there anything high-level that would allow me to easily mix these four audio files?

3) Can this be done entirely with standard browser technology on the client side? (ie HTML5)

Have a close look at the MP3 format. It is remarkably easy and efficient to parse, chop up into little bits, and reassemble into a custom stream.

Hence rolling your own server-side code to grab what you want and send to the client will not be as crazy or difficult as it may sound.

MP3 is also widely supported by various clients. I strongly suspect any HTML5 capable browser will be able of play the stream you generate via a long-lived bit-rate regulated HTTP request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM