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

var myContext  = 0
let kStatusKey              = "status"
let kLoadedTimeRangesKey    = "loadedTimeRanges"
let KPlaybackBufferEmptyKey = "playbackBufferEmpty"
let kPlaybackLikelyToKeepUp = "playbackLikelyToKeepUp"

class MediaItem: NSObject {

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