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

                    @current.sound?.togglePause()

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

                    @playTrack playlist.length - 1

                seek: (progress) ->
                    return unless @current.sound?

                    position = progress * @current.sound.duration
                    @current.position = position
                    @current.sound.setPosition position

                stop: ->
                    $interval.cancel @current.interval
