title: How to set volume for AVPlayer
body: <p>I'm trying to set volume for the AVPlayer but it doesn't seem to work. It takes system volume and ignores the value set in the code. Following is my code. How do we set a volume level?</p>
  
  <pre><code>let player = AVPlayer(url: URL(string:recordingFileURL)!)
  let playerController = AVPlayerViewController()
  playerController.player = player
  playerController.videoGravity = AVLayerVideoGravity(rawValue: AVLayerVideoGravity.resizeAspectFill.rawValue)
  
  self.present(playerController, animated: true) {
      player.play()
      player.volume = 0.8 // Doesn't have any affect
  }
  </code></pre>