)We have a hit counter everytime an mp3 file is streamed from the server.
The following code produces 2 network requests on load:
let fileUrl = URL(string: "https://something.mp3")
avPlayer = AVPlayer(url: fileUrl!)
avPlayer.play()
Here is a SO link that describes the behaviour (https://stackoverflow.com/questions/37244956/why-does-swifts-avplayer-loads-the-playeritem-for-twice-on-one-play).
Is there anyway to load the play with one network request?