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


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

        }
    }
    
    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")
    }
}