title: Get current time of video playing in AVPlayer ios
body: <p>When I am playing video using AVPlayer then i am not able to get current item when video starts playing. I have used below code to get current time.
  Please help me to resolve below issue. Thanks in advance</p>
  
  <pre><code>let item1 = AVPlayerItem.init(URL: NSURL(string:path))
  let player = AVPlayer(playerItem: item1)
  
  layer?.player = player;
  player?.play
  
  let currentItem:AVPlayerItem = player!.currentItem
  let currentTime:NSTimeInterval = CMTimeGetSeconds(currentItem.currentTime())
  </code></pre>