             context: &myContext
         )
         self.avPlayerItem!.addObserver(self,
-                                       forKeyPath: KPlaybackBufferEmptyKey,
+                                       forKeyPath: kPlaybackBufferEmptyKey,
                                        options: NSKeyValueObservingOptions.New,
                                        context: &myContext)
         self.avPlayerItem!.addObserver(self,

                                                    loaded: availableDuration,
                                                    outOf: totalDuration)
                    }
                case KPlaybackBufferEmptyKey:
                    if playerItem.playbackBufferEmpty {
                        self.player.changeState(.Buffering)
                    }

        self.avPlayerItem?.removeObserver(self, forKeyPath: kStatusKey)
        self.avPlayerItem?.removeObserver(self, forKeyPath: kLoadedTimeRangesKey)
        self.avPlayerItem?.removeObserver(self, forKeyPath: kPlaybackLikelyToKeepUp)
        self.avPlayerItem?.removeObserver(self, forKeyPath: kPlaybackBufferEmptyKey)
        self.avPlayerItem = nil
        self.mediaResourceLoader?.session.invalidateAndCancel()
    }
