 
     public override init() {
         super.init()
+        self.player = AVPlayer()
+        self.player.actionAtItemEnd = .Pause
+        self.player.addObserver(self, forKeyPath: PlayerRateKey, options: (NSKeyValueObservingOptions.New | NSKeyValueObservingOptions.Old) , context: &PlayerObserverContext)
+
         self.playbackLoops = false
         self.playbackFreezesAtEnd = false
         self.playbackState = .Stopped

    // MARK: NSNotifications
    
    public func playerItemDidPlayToEndTime(aNotification: NSNotification) {
        if self.playbackLoops.boolValue || self.playbackFreezesAtEnd.boolValue {
            self.player.seekToTime(kCMTimeZero)
        }
    }
    

    
    public var playbackLoops: Bool! {
        get {
            return (self.player.actionAtItemEnd == .None) as Bool
        }
        set {
            if newValue.boolValue {
                self.player.actionAtItemEnd = .None
            } else {
                self.player.actionAtItemEnd = .Pause
            }
        }
    }
