   @getSongs: (callbacks)->
     Kandan.Store.get @pluginId, callbacks
 
-  @nicknameToUrl: (url) ->
+  @localFileUrl: (fileName) ->
+    "http://#{ window.location.hostname }:#{ window.location.port }/sounds/#{ fileName }"
+
+  @localSounds: (name) ->
     sounds = {
-      'claps'  : 'golfclap.mp3',
-      'cheers' : 'cheers.mp3',
-      'ding'   : 'ding.wav',
-      'gong'   : 'gong.mp3'
+      'claps'  : @localFileUrl('golfclap.mp3')
+      'cheers' : @localFileUrl('cheers.mp3')
+      'ding'   : @localFileUrl('ding.wav')
+      'gong'   : @localFileUrl('gong.mp3')
       }
 
-    fullUrl   = null
-    fullUrl   = sounds[url]
-    fullUrl ||= url
+    sounds[name]
 
   @audioChannels: ->
     Kandan.Helpers.Audio.audioChannels()

    if @audioChannel(channelId)?
      @unmute(channelId)

# Kandan.Plugins.register "Kandan.Plugins.MusicPlayer"

  @widgetTitle: "Player"
  @playRegex: /^&#x2F;play .+/
  @stopRegex: /^&#x2F;stop/
  @resumeRegex: /^&#x2F;resume/
  @localSongData: false


  @playTemplate:   _.template('<strong><a class="audio-play">playing</a> <a target="_blank" href="<%- url %>"><%- url %></a></strong>')
  @stopTemplate:   _.template('<strong><a class="audio-play">stopping</a> the music.')
  @resumeTemplate: _.template('<strong><a class="audio-play">resuming</a> the music.')
  @songTemplate:   _.template('<li><%= song.split("/").pop() %></li>')


  @setError: (errorMessage)->
