title: How to play Data type video using AVPlayer?
body: <p>I am trying to play a video after I download from remote using following code. </p>
  
  <pre><code>let player = AVPlayer(url: URL(dataRepresentation: VideoService.instance.videoInfoArray[0].video, relativeTo: nil)!)
  let playerController = AVPlayerViewController()
  playerController.player = player
  present(playerController, animated: true) {
  player.play()
  }
  </code></pre>
  
  <p>My VideoService class is a singleton class and video variable type is <code>Data()</code>. However when I try to play video with below code it is not working. How can I play video using data representative? </p>