AVPlayer vs. AVAudioPlayer

前端 未结 3 942
死守一世寂寞
死守一世寂寞 2020-12-23 12:39

The documentation for AVPlayer states the following:

[The] player works equally well with local and remote media files

However,

3条回答
  •  醉酒成梦
    2020-12-23 13:11

    1. AVPlayer can play from AVPlayerItem using AVURLAsset with an iPod library url. The AVAudioPlayer cannot play from an iPod library url.

    2. 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.

    3. AVPlayer seems to report an incorrect currentTime after seeking. But AVAudioPlayer reports accurately.

提交回复
热议问题