refactored sound system so that they can be specified in ACP, updated soundfile to work in FF, which fixes #1209

This commit is contained in:
Julian Lam
2014-03-13 17:15:07 -04:00
parent 175230e337
commit 553cabdcfa
10 changed files with 143 additions and 55 deletions

View File

@@ -198,7 +198,8 @@ SocketModules.chats.send = function(socket, data) {
server.getUserSockets(touid).forEach(function(s) {
s.emit('event:chats.receive', {
fromuid: socket.uid,
uid: socket.uid,
fromUid: socket.uid,
username: username,
message: parsed,
timestamp: Date.now()
@@ -207,7 +208,8 @@ SocketModules.chats.send = function(socket, data) {
server.getUserSockets(socket.uid).forEach(function(s) {
s.emit('event:chats.receive', {
fromuid: touid,
uid: touid,
fromUid: socket.uid,
username: toUsername,
message: parsed,
timestamp: Date.now()
@@ -234,4 +236,17 @@ SocketModules.notifications.mark_all_read = function(socket, data, callback) {
notifications.mark_all_read(socket.uid, callback);
};
/* Sounds */
SocketModules.sounds = {};
SocketModules.sounds.getSounds = function(socket, data, callback) {
// Read sounds from local directory
meta.sounds.getLocal(callback);
};
SocketModules.sounds.getMapping = function(socket, data, callback) {
meta.sounds.getMapping(callback);
};
module.exports = SocketModules;