title: How to add url in avaudioplayer in swift
body: <p>i just want to ask on how to play audio using avAudion using url link.. </p>
  
  <p>and im getting error bad request.. can someone help me?</p>
  
  <p>i already tried using avplayer but it is not suitable for me.. though it is working but.. i kinda prefer to use avaudioplayer</p>
  
  <pre><code>    let mp3URL = NSURL(fileURLWithPath:"https://s3.amazonaws.com/kargopolov/kukushka.mp3")
      do {
          // 2
          audioPlayer = try AVAudioPlayer(contentsOf: mp3URL as URL)
          audioPlayer.play()
          // 3
          Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(updateAudioProgressView), userInfo: nil, repeats: true)
          progressView.setProgress(Float(audioPlayer.currentTime/audioPlayer.duration), animated: false)
      }
      catch {
              print("An error occurred while trying to extract audio file")
      }
  </code></pre>