         
         if (shouldAutoplay) {
             player?.play()
+            if shouldNotify {
+                NSNotificationCenter.defaultCenter().postNotificationName(PlayerDidChangeStateNotification, object: self)
+            }
         }
     }
     

    func pause(notify: Bool) {
        player?.pause()
        shouldAutoplay = false
        if notify {
            NSNotificationCenter.defaultCenter().postNotificationName(PlayerDidChangeStateNotification, object: self)
        }

    }
    
    private var shouldAutoplay = false
    private var shouldNotify = false
    func play(notify: Bool) {
        prepareToPlay()
        finishedPlaying = false
        if (player == nil) {
            shouldAutoplay = true
            shouldNotify = notify
        } else {
            player?.play()
            if notify {
                NSNotificationCenter.defaultCenter().postNotificationName(PlayerDidChangeStateNotification, object: self)
            }
        }
    }
    
