Possible duplicate:Play AVPlayer
I am using AVPlayer to play streaming audio from a URL. I want to show the percentage of buffering during audio streaming. I know that I can watch the playbackBufferEmpty and playBackLiciousToKeepUp properties, but it can only give me information if a buffer is loading.
Do you have any idea how to implement this?
Thank.
AVPlayerItem has a property for loaded TimeRanges. If you know the length of the sound, you can use this property to find out what percentage of the audio downloaded at any given time.