                     @playTrack playlist.length - 1
 
                 seek: (progress) ->
+                    return unless @current.sound?
+
                     position = progress * @current.sound.duration
                     @current.position = position
-                    @current.sound?.setPosition position
+                    @current.sound.setPosition position
 
                 stop: ->
                     $interval.cancel @current.interval

                    @current.sound?.togglePause()

                playTrack: (index) ->
                    @stop()
                    @current =
                        track: playlist[index]

            scope.player = player =
                current: {}
                play: ->
                    if @current.sound?
                        if @current.sound.paused
                            @current.sound.play()
                    else if playlist.length
                        @playTrack 0

