add junto spinner for call in progress
This commit is contained in:
parent
dfc94b4079
commit
64283850e3
5 changed files with 53 additions and 39 deletions
BIN
app/assets/images/junto.gif
Normal file
BIN
app/assets/images/junto.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -159,14 +159,27 @@ Metamaps.GlobalUI = {
|
|||
notifyUser: function (message, leaveOpen) {
|
||||
var self = Metamaps.GlobalUI;
|
||||
|
||||
Metamaps.Famous.toast.surf.setContent(message);
|
||||
Metamaps.Famous.toast.show();
|
||||
clearTimeout(self.notifyTimeOut);
|
||||
if (!leaveOpen) {
|
||||
self.notifyTimeOut = setTimeout(function () {
|
||||
Metamaps.Famous.toast.hide();
|
||||
}, 8000);
|
||||
function famousReady() {
|
||||
Metamaps.Famous.toast.surf.setContent(message);
|
||||
Metamaps.Famous.toast.show();
|
||||
clearTimeout(self.notifyTimeOut);
|
||||
if (!leaveOpen) {
|
||||
self.notifyTimeOut = setTimeout(function () {
|
||||
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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue