diff --git a/app/assets/images/junto_spinner_darkgrey.gif b/app/assets/images/junto_spinner_darkgrey.gif new file mode 100644 index 00000000..b2874254 Binary files /dev/null and b/app/assets/images/junto_spinner_darkgrey.gif differ diff --git a/app/assets/images/sounds/MM_sounds.mp3 b/app/assets/images/sounds/MM_sounds.mp3 new file mode 100644 index 00000000..b6003466 Binary files /dev/null and b/app/assets/images/sounds/MM_sounds.mp3 differ diff --git a/app/assets/images/sounds/MM_sounds.ogg b/app/assets/images/sounds/MM_sounds.ogg new file mode 100644 index 00000000..875b0d4b Binary files /dev/null and b/app/assets/images/sounds/MM_sounds.ogg differ diff --git a/app/assets/images/sounds/sounds.mp3 b/app/assets/images/sounds/sounds.mp3 deleted file mode 100644 index 04f65df0..00000000 Binary files a/app/assets/images/sounds/sounds.mp3 and /dev/null differ diff --git a/app/assets/images/sounds/sounds.ogg b/app/assets/images/sounds/sounds.ogg deleted file mode 100644 index aaf4e774..00000000 Binary files a/app/assets/images/sounds/sounds.ogg and /dev/null differ diff --git a/app/assets/javascripts/src/Metamaps.js.erb b/app/assets/javascripts/src/Metamaps.js.erb index 7a9d803b..c49e6801 100644 --- a/app/assets/javascripts/src/Metamaps.js.erb +++ b/app/assets/javascripts/src/Metamaps.js.erb @@ -1938,15 +1938,6 @@ Metamaps.Realtime = { init: function () { var self = Metamaps.Realtime; - var reenableRealtime = function () { - self.reenableRealtime(); - }; - var turnOff = function () { - self.turnOff(); - }; - $(".rtOn").click(reenableRealtime); - $(".rtOff").click(turnOff); - self.addJuntoListeners(); self.socket = new SocketIoConnection({ url: '<%= ENV['REALTIME_SERVER'] %>' }); @@ -2248,8 +2239,12 @@ Metamaps.Realtime = { invitedToCall: function (inviter) { var self = Metamaps.Realtime; + self.room.chat.sound.stop('sessioninvite'); + self.room.chat.sound.play('sessioninvite'); + var username = self.mappersOnMap[inviter].name; - var notifyText = username + ' is suggesting a video call. What do you think?'; + var notifyText = "' style='display: inline-block; margin-top: -12px; vertical-align: top;' />"; + notifyText += username + ' is inviting you to a conversation. Join live?'; notifyText += ' '; notifyText += ' '; Metamaps.GlobalUI.notifyUser(notifyText, true); @@ -2257,6 +2252,9 @@ Metamaps.Realtime = { invitedToJoin: function (inviter) { var self = Metamaps.Realtime; + self.room.chat.sound.stop('sessioninvite'); + self.room.chat.sound.play('sessioninvite'); + var username = self.mappersOnMap[inviter].name; var notifyText = username + ' is inviting you to the conversation. Join?'; notifyText += ' '; @@ -2265,6 +2263,7 @@ Metamaps.Realtime = { }, acceptCall: function (userid) { var self = Metamaps.Realtime; + self.room.chat.sound.stop('sessioninvite'); self.socket.emit('callAccepted', { mapid: Metamaps.Active.Map.id, invited: Metamaps.Active.Mapper.id, @@ -2275,6 +2274,7 @@ Metamaps.Realtime = { }, denyCall: function (userid) { var self = Metamaps.Realtime; + self.room.chat.sound.stop('sessioninvite'); self.socket.emit('callDenied', { mapid: Metamaps.Active.Map.id, invited: Metamaps.Active.Mapper.id, @@ -2284,6 +2284,7 @@ Metamaps.Realtime = { }, denyInvite: function (userid) { var self = Metamaps.Realtime; + self.room.chat.sound.stop('sessioninvite'); self.socket.emit('inviteDenied', { mapid: Metamaps.Active.Map.id, invited: Metamaps.Active.Mapper.id, @@ -2322,14 +2323,14 @@ Metamaps.Realtime = { var self = Metamaps.Realtime; var username = self.mappersOnMap[userid].name; - Metamaps.GlobalUI.notifyUser(username + ' didn\'t accept your invite.'); + Metamaps.GlobalUI.notifyUser(username + ' didn\'t accept your invitation'); self.room.chat.invitationAnswered(userid); }, inviteDenied: function (userid) { var self = Metamaps.Realtime; var username = self.mappersOnMap[userid].name; - Metamaps.GlobalUI.notifyUser(username + ' didn\'t accept your invite.'); + Metamaps.GlobalUI.notifyUser(username + ' didn\'t accept your invitation'); self.room.chat.invitationAnswered(userid); }, joinCall: function () { @@ -2611,6 +2612,7 @@ Metamaps.Realtime = { // create an item for them in the realtime box if (data.userid !== Metamaps.Active.Mapper.id && self.status) { + self.room.chat.sound.play('joinmap'); self.room.chat.addParticipant(self.mappersOnMap[data.userid]); // create a div for the collaborators compass @@ -2661,7 +2663,7 @@ Metamaps.Realtime = { // data.username delete self.mappersOnMap[data.userid]; - + self.room.chat.sound.play('leavemap'); //$('#mapper' + data.userid).remove(); $('#compass' + data.userid).remove(); self.room.chat.removeParticipant(data.username); diff --git a/app/assets/javascripts/src/views/chatView.js.erb b/app/assets/javascripts/src/views/chatView.js.erb index 605c15ed..7a1e7f8e 100644 --- a/app/assets/javascripts/src/views/chatView.js.erb +++ b/app/assets/javascripts/src/views/chatView.js.erb @@ -38,7 +38,7 @@ Metamaps.Views.chatView = (function () { this.$participants = $('
'); this.$conversationInProgress = $('