0

I use an NSURLConnection to get a media file downloaded. While downloading I store the content at a NEMutableData and write it down to a cache file. Now I want to play this file while downloading with AVPlayer (Not AVAudioPlayer) because it could be video.

At the time the AVPlayer get the URL to the cache file it looks like the player copy the state of the file because the player don't get any changes and after a few seconds it holds because of the end of data.

Does anybody has a better solution but to download everything first until start playing, or is there a way to give the AVPlayer an Internet NSURL and preload the rest while streaming?

4

0 に答える 0