title: Swift: AVPlayer playing video is showing this error: [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContext
body: <p>I'm trying to play a video from bundle directory but I'm getting this error:</p>
  
  <blockquote>
    <p>video[29054:2968406] [MediaRemote] [AVOutputContext] WARNING: AVF
    context unavailable for sharedAudioPresentationContex</p>
  </blockquote>
  
  <p>This is my implementation:</p>
  
  <pre><code>import UIKit
  import AVKit
  import AVFoundation
  
  
  class ViewController: UIViewController {
      var playerVC = AVPlayerViewController()
      var playerView = AVPlayer()
  
      override func viewDidLoad() {
          super.viewDidLoad()
          self.playVideo()
  
      }
  
  
      func playVideo() {
          let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).last! as NSURL
          guard let fileURL  = documentsDirectory.appendingPathComponent("video.mp4") else{ return }
          self.playerView = AVPlayer(url:fileURL as URL)
          self.playerVC.player = playerView
          self.view.addSubview(self.playerVC.view)
          self.addChildViewController(self.playerVC)
          playerView.play()
  
      }
  </code></pre>
  
  <p>Any of you knows what I'm doing wrong?, I'll really appreciate your help.</p>