I’m using AVPlayer to play audio from remote server.
I want to display a progress bar showing the buffering progress and the “time played” progress, like the MPMoviePlayerController does when you play a movie.
Does the AVPlayer has any UI component that display this info? If not, how can I get this info (buffering state)?
Thanks
Does the AVPlayer has any UI component that display this info?
No, there’s no UI component for AVPlayer.
If not, how can I get this info (buffering state)?
You should observer
AVPlayerItem.loadedTimeRangesthen using KVO to watch
timerange.durationis what you expect for.And you have to draw buffer progress manually.
Refs here.