     func registerPlayerItemEvent() {
         let options = NSKeyValueObservingOptions.Old | NSKeyValueObservingOptions.New
         
-        playerItem.addObserver(self, forKeyPath:kStatusKey, options:options, context: UnsafeMutablePointer<Void>(unsafeAddressOf(kStatusKey)))
+        playerItem!.addObserver(self, forKeyPath:kStatusKey, options:options, context: UnsafeMutablePointer<Void>(unsafeAddressOf(kStatusKey)))
         keyobserver.status = true
         
-        playerItem.addObserver(self, forKeyPath:kPlaybackKeepUpKey, options:options, context:nil)
+        playerItem!.addObserver(self, forKeyPath:kPlaybackKeepUpKey, options:options, context:nil)
         keyobserver.keep = true
         
-        playerItem.addObserver(self, forKeyPath:kPresentationSizeKey, options:options, context:nil)
+        playerItem!.addObserver(self, forKeyPath:kPresentationSizeKey, options:options, context:nil)
         keyobserver.presentation = true
         
-        playerItem.addObserver(self, forKeyPath:kDurationKey, options:options, context:nil)
+        playerItem!.addObserver(self, forKeyPath:kDurationKey, options:options, context:nil)
         keyobserver.duration = true
         
-        playerItem.addObserver(self, forKeyPath:kLoadedKey, options:options, context:nil)
+        playerItem!.addObserver(self, forKeyPath:kLoadedKey, options:options, context:nil)
         keyobserver.loaded = true
         
         NSNotificationCenter.defaultCenter().addObserver(self, selector:"playerItemDidReachEnd:", name:AVPlayerItemDidPlayToEndTimeNotification, object:playerItem)

    }
    
    public func isPlaying() -> Bool {
        return player!.isPlaying()
    }

    public func isDirectPause() -> Bool {


    public func play() {
        playerstate.dpause = false
        player?.play()
    }
    
    public func pause() {
        player?.pause()
    }
    
    public func dpause() {
