add junto spinner for call in progress

This commit is contained in:
Connor Turland 2015-12-22 17:46:19 -05:00
parent dfc94b4079
commit 64283850e3
5 changed files with 53 additions and 39 deletions

BIN
app/assets/images/junto.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -159,6 +159,7 @@ Metamaps.GlobalUI = {
notifyUser: function (message, leaveOpen) {
var self = Metamaps.GlobalUI;
function famousReady() {
Metamaps.Famous.toast.surf.setContent(message);
Metamaps.Famous.toast.show();
clearTimeout(self.notifyTimeOut);
@ -167,6 +168,18 @@ Metamaps.GlobalUI = {
Metamaps.Famous.toast.hide();
}, 8000);
}
}
// initialize the famous ui
var callFamous = function(){
if (Metamaps.Famous && Metamaps.Famous.toast) {
famousReady();
}
else {
setTimeout(callFamous, 100);
}
}
callFamous();
},
clearNotify: function() {
var self = Metamaps.GlobalUI;

View file

@ -2024,7 +2024,6 @@ Metamaps.Realtime = {
var heightOfVideo = 150;
var padding = 25;
var top = paddingAboveTop + (self.videosInPosition * heightOfVideo) + padding;
console.log(top);
var left = 30;
//var right = Math.floor((Math.random() * (468 - 100)) + 1);
v.setParent($('#wrapper'));
@ -2153,12 +2152,13 @@ Metamaps.Realtime = {
inviter: Metamaps.Active.Mapper.id,
invited: userid
});
Metamaps.GlobalUI.notifyUser('Invitation pending...', true);
},
callAccepted: function (userid) {
var self = Metamaps.Realtime;
var username = self.mappersOnMap[userid].name;
Metamaps.GlobalUI.notifyUser(username + ' liked your suggestion! Video call starting...');
Metamaps.GlobalUI.notifyUser('Conversation starting...');
self.joinCall();
},
callDenied: function (userid) {

View file

@ -215,12 +215,14 @@ Metamaps.Views.chatView = (function () {
this.$conversationInProgress.show();
this.$participants.addClass('is-live');
if (participating) this.$conversationInProgress.addClass('is-participating');
this.$button.addClass('active');
}
chatView.prototype.conversationEnded = function () {
this.$conversationInProgress.hide();
this.$participants.removeClass('is-live');
this.$conversationInProgress.removeClass('is-participating');
this.$button.removeClass('active');
}
chatView.prototype.addParticipant = function (participant) {

View file

@ -146,7 +146,6 @@ Metamaps.Views.room = (function () {
}
room.prototype.removeVideo = function (peer) {
console.log('removeVideo', peer);
var id = typeof peer == 'string' ? peer : peer.id;
if (this.videos[id]) {
this.videos[id].remove();