 
 public class AVFoundationPlayback: Playback {
     private var kvoStatusDidChangeContext = 0
+    private var kvoTimeRangesContext = 0
     
     private var player: AVPlayer!
     private var playerLayer: AVPlayerLayer!

            switch context {
            case &kvoStatusDidChangeContext:
                handleStatusChangedEvent()
            default:
                break
            }

        }
    }
    
    private func handleTimeRangesEvent() {
        guard let timeRange = player.currentItem?.loadedTimeRanges.first?.CMTimeRangeValue else {
            return
        }
        
        let info = ["start_position" : CMTimeGetSeconds(timeRange.start),
                      "end_position" : CMTimeGetSeconds(CMTimeAdd(timeRange.start, timeRange.duration)),
                          "duration" : CMTimeGetSeconds(timeRange.start)]
        
        trigger(.Progress, userInfo: info)
    }
    
    deinit {
        player.removeObserver(self, forKeyPath: "currentItem.status")
        player.removeObserver(self, forKeyPath: "currentItem.loadedTimeRanges")
    }
}