I am trying to play multiple mp3s using AVPlayer . I get the mp3 urls and then let AVPlayer play them one by one.
My first attempt is to allow a single AVPlayer play all mp3s using the replaceCurrentItemWithPlayerItem method. But there is no sound except the first song.
When I try to create AVPlayer for each individual element and each AVPlayer element plays its element, the application works the way I wanted.
My question is: is AVPlayer designed to play a single item? If I do not want to allocate a new AVPlayer for each item, I have to use AVQueuePlayer to play multiple items, right? Which method is preferred?
source share