Add default sounds

pull/5366/head
Marcelo Schmidt 9 years ago
parent 8219f13448
commit 06fa160468
No known key found for this signature in database
GPG Key ID: CA48C21A7B66097E
  1. 15
      packages/rocketchat-custom-sounds/client/lib/CustomSounds.js
  2. BIN
      public/sounds/ding.mp3
  3. BIN
      public/sounds/verbal.mp3

@ -2,10 +2,20 @@
class CustomSounds {
constructor() {
this.list = new ReactiveVar({});
this.add({ _id: 'beep', name: 'Beep', extension: 'mp3', src: '/sounds/beep.mp3' });
this.add({ _id: 'chelle', name: 'Chelle', extension: 'mp3', src: '/sounds/chelle.mp3' });
this.add({ _id: 'chime', name: 'Chime', extension: 'mp3', src: '/sounds/chime.mp3' });
this.add({ _id: 'ding', name: 'Ding', extension: 'mp3', src: '/sounds/ding.mp3' });
this.add({ _id: 'door', name: 'Door', extension: 'mp3', src: '/sounds/door.mp3' });
this.add({ _id: 'droplet', name: 'Droplet', extension: 'mp3', src: '/sounds/droplet.mp3' });
this.add({ _id: 'highbell', name: 'Highbell', extension: 'mp3', src: '/sounds/highbell.mp3' });
this.add({ _id: 'seasons', name: 'Seasons', extension: 'mp3', src: '/sounds/seasons.mp3' });
}
add(sound) {
sound.src = this.getURL(sound);
if (!sound.src) {
sound.src = this.getURL(sound);
}
const audio = $('<audio />', { id: sound._id, preload: true }).append(
$('<source />', { src: sound.src })
);
@ -41,7 +51,8 @@ class CustomSounds {
}
getList() {
return Object.values(this.list.get());
const list = Object.values(this.list.get());
return _.sortBy(list, 'name');
}
}

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save