The documentation for AVPlayer states the following:
[The] player works equally well with local and remote media files
However,
The AVPlayer actually has a similar property as the playing property of AVAudioPlayer.
Take a look at the rate
property.
AVPlayer can play from AVPlayerItem using AVURLAsset with an iPod library url. The AVAudioPlayer cannot play from an iPod library url.
AVPlayer has no volume property and requires the use of the system volume setting which can be controlled only by the hardware switch or an MPVolumeView. But you can set the mix volume of AVAudioPlayer.
AVPlayer seems to report an incorrect currentTime after seeking. But AVAudioPlayer reports accurately.
7 years after...
From a point of view with dependence on Swift and CocoaPods, so my answer is comparing for iOS 8+ only.
identical support since iOS6
identical support:
AVAudioPlayer
directly.both AVPlayer and AVAudioPlayer seem to report an incorrect currentTime after seeking:
AVURLAssetPreferPreciseDurationAndTimingKey
when initializing AVURLAssets. And rely on values given by observer block.AVPlayer
to play multiple filesAVAudioPlayer
to play multiple files