                 let secs = CMTimeGetSeconds(player.currentItem.duration)
                 if (newValue.isNormal && secs.isNormal) {
                     finishedPlaying = false
-                    player.seekToTime(CMTimeMake(Int64(newValue * secs), 1))
+                    player.seekToTime(CMTimeMakeWithSeconds(Float64(newValue * secs), 1))
                 }
             }
         }

        return NSSet(objects: "currentTime")
    }
    
    func play() {
        if (finishedPlaying) {
            finishedPlaying = false
            currentTime = 0.0

import AVFoundation

class Player: NSObject {
    private var player: AVPlayer? {
        didSet {
            oldValue?.pause()
            
            if let notificationValue: AnyObject = notificationValue {
                NSNotificationCenter.defaultCenter().removeObserver(notificationValue)
            }
            
            notificationValue = NSNotificationCenter.defaultCenter().addObserverForName(AVPlayerItemDidPlayToEndTimeNotification,
                object: player?.currentItem,
                queue: nil) { [unowned self] (notif) -> Void in
                    self.finishedPlaying = true
                    // we finished playing, destroy the object
                    self.player = nil
            }
        }
    }
    var callBack: ((playing: Bool) -> Void)?
    private var notificationValue: AnyObject?
    private(set) var finishedPlaying = false
    
    var fileURL: NSURL!
    init(fileURL: NSURL) {
        super.init()
        // hack to enable did set
        self.fileURL = fileURL
    }
    
    class func keyPathsForValuesAffectingCurrentTime(key: NSString) -> NSSet {
