         }
     }
 }
+
+
+extension CMTime {
+    var msS: (Int, Int, Int) {
+        let duration = CMTimeGetSeconds(self)
+        let minutes = Int(floor(duration / 60))
+        let seconds = Int(floor(duration - Double(minutes) * 60))
+        let milliseconds = Int((duration - floor(duration)) * 100)
+        return (minutes, seconds, milliseconds)
+    }
+
+    var stringInmmssSS: String {
+        let (minutes, seconds, milliseconds) = msS
+        return String(format: "%02d:%02d.%02d", minutes, seconds, milliseconds)
+    }
+
+    var stringInmmmsssSS: String {
+        let (minutes, seconds, milliseconds) = msS
+        return String(format: "%02dm%02ds%02d", minutes, seconds, milliseconds)
+    }
+}
+


    private var positionsLabelText: String {
        guard let time = posterFrameTime else { return "" }
        let duration = CMTimeGetSeconds(time)
        let minutes = Int(floor(duration / 60))
        let seconds = Int(floor(duration - Double(minutes) * 60))
        let milliseconds = Int((duration - floor(duration)) * 100)
        let timeString = String(format: "%02d:%02d.%02d", minutes, seconds, milliseconds)
        return "Poster Frame: \(timeString)"
    }

    @objc private func capturePosterFrame(sender: AnyObject?) {

    }

    init!(movieURL: NSURL) {
        self.movieURL = movieURL
        playerItem = AVPlayerItem(URL: movieURL)
        player = AVPlayer(playerItem: playerItem)
        playerView.player = player
