             }
         }
     }
+
+    func playerItemDidReachEnd(notification: NSNotification) {
+        mediaControlView.playState = .Pause
+    }
 }


    @IBOutlet weak var mediaControlView: MediaControlView!

    
    override func viewDidLoad() {
        super.viewDidLoad()

                            let coundDownTime = Double(Int((durationSeconds - currentSeconds) * 10)) / 10
                            self.mediaControlView.timeLabel.text = "\(coundDownTime)"
                        })

                        NSNotificationCenter.defaultCenter().addObserver(self, selector: "playerItemDidReachEnd:", name: AVPlayerItemDidPlayToEndTimeNotification, object: player.currentItem)

                        mediaView.videoPlayerLayer.player = player

