       percent = clamp targetX / @track.width()
 
       @sound.setPosition percent * @sound.duration
-      @playerTimeUpdated()
+      @soundPlaying()
 
     seekEnd: (e) =>
       return if not @seeking


        when LEFT
          @sound.setPosition clamp @sound.position - @keySeek, min: 0, max: @sound.duration
          @playerTimeUpdated()

        when RIGHT
          @sound.setPosition clamp @sound.position + @keySeek, min: 0, max: @sound.duration
          @playerTimeUpdated()

  module.exports = SpectrogramPlayer

      doc.on 'mousemove', @seekMove
      doc.on 'mouseup', @seekEnd

    setImage: (@image) =>
      @spectrogram.attr src: @image

    setAudio: (@audio) =>
      @el.removeClass 'loaded'

      @sound?.destruct()

      soundManager.onready =>
        @sound = soundManager.createSound
          id: "AUDIO_#{Math.floor Math.random() * 9999}"
          url: @audio

          whileloading: @soundLoading
          onload: @soundLoaded
          onplay: @soundPlayed
          whileplaying: @soundPlaying
          onpause: @soundPaused
          onfinish: @soundFinished

    soundLoading: =>
      @el.addClass 'loading'

    soundLoaded: =>
      @el.removeClass 'loading'
      @el.addClass 'loaded'

    soundPlayed: =>
      @el.addClass 'playing'

    soundPlaying: =>
      finishedPercent = "#{(@sound.position / @sound.duration) * 100}%"
      @seekLine.css left: finishedPercent
      @fill.css width: finishedPercent
      @thumb.css left: finishedPercent

    soundPaused: =>
      @el.removeClass 'playing'

    soundFinished: =>
      @soundPaused()
      delay 500, =>
        @sound.setPosition 0
        @soundPlaying()

    play: =>
      @sound.play()
