Saving buffer data of AVPlayer

后端 未结 4 1324
耶瑟儿~
耶瑟儿~ 2020-12-08 05:33

I am playing audio from my server using AVPlayer in my application. Now I want that when it completely buffer the audio then I can save that data in the application to play

4条回答
  •  攒了一身酷
    2020-12-08 06:24

    Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...

提交回复
热议问题