Skip to content

Commit

Permalink
Merge pull request #201 from mjtko/feature/updated-mention-sound
Browse files Browse the repository at this point in the history
Updated mention sound - now works cross-browser
  • Loading branch information
gabceb committed Mar 9, 2013
2 parents 7530273 + f2240b0 commit 374e568
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
Expand Up @@ -9,7 +9,7 @@ class Kandan.Plugins.MusicPlayer
@localSongData: false
@sounds: {
channel: 'ding.wav'
attention: 'gong.mp3'
attention: 'threetone-alert.wav'
}

@playTemplate: _.template('<strong><a class="audio-play">playing</a> <a target="_blank" href="<%- url %>"><%- url %></a></strong>')
Expand Down Expand Up @@ -117,10 +117,8 @@ class Kandan.Plugins.MusicPlayer

@localSounds: (name) ->
sounds = {
'claps' : @localFileUrl('golfclap.mp3')
'cheers' : @localFileUrl('cheers.mp3')
'ding' : @localFileUrl('ding.wav')
'gong' : @localFileUrl('gong.mp3')
'threetone-alert' : @localFileUrl('threetone-alert.wav')
'ding' : @localFileUrl('ding.wav')
}

sounds[name]
Expand Down Expand Up @@ -174,6 +172,7 @@ class Kandan.Plugins.MusicPlayer
@unmute(channelId)

@playAudioNotice: (type)->
console.log "told to play for: #{type}"
sound = @sounds[type] || 'ding.wav'
url = @localFileUrl(sound)
player = $('.audio_private')[0]
Expand Down
Binary file removed public/sounds/cheers.mp3
Binary file not shown.
Binary file removed public/sounds/golfclap.mp3
Binary file not shown.
Binary file removed public/sounds/gong.mp3
Binary file not shown.
Binary file added public/sounds/threetone-alert.wav
Binary file not shown.

0 comments on commit 374e568

Please sign in to comment.