musiian latency badge error fixing

This commit is contained in:
Nuwan 2021-06-16 22:30:54 +05:30
parent 1d0e33fdc1
commit 7627b39925
3 changed files with 14 additions and 6 deletions

View File

@ -132,6 +132,7 @@
$(hoverSelector).css(css);
$(hoverSelector).fadeIn(500);
logger.debug("before bindUserLatencyUpdate userId=", userId)
bindUserLatencyUpdate(userId);
LatencyActions.resolve([userId]);
@ -187,10 +188,13 @@
}
function bindUserLatencyUpdate(userId){
var latency;
// var latency;
$(document).on('user_latency_update', function(e, latencyResp){
var userLatency = latencyResp['users'].find(function(latency) {
logger.debug("bindUserLatencyUpdate", latencyResp);
logger.debug("bindUserLatencyUpdate.userId", userId);
var userLatency = latencyResp.find(function(latency) {
return latency.user_id === userId;
});
@ -201,7 +205,7 @@
}else{
showUnknownLatencyBadge(userId);
}
});
})
}
function bindUserLatencyFail(){
@ -257,6 +261,7 @@
}
this.hideBubble = function() {
logger.debug("hideBubble called")
unbindUserLatencyUpdate();
unbindUserLatencyFail();
//$(hoverSelector).hide();

View File

@ -15,6 +15,7 @@ rest = new context.JK.Rest()
onAppInit: (@app) ->
changed: () ->
logger.debug("LatencyStore.latencies = ", @latencies)
$(document).triggerHandler("user_latency_update", @latencies)
@trigger(@latencies)
@ -22,8 +23,10 @@ rest = new context.JK.Rest()
rest.getLatencyToUsers({user_ids: user_ids}).done((response) => @onLoaded(response)).fail((jqXHR) => @onLatencyFail(jqXHR, [user_ids]))
onLoaded: (response) ->
logger.debug("LatencyStore.onLoaded", response);
@latencies.push(response)
logger.debug("LatencyStore.onLoaded response", response)
usersLatencies = response.users
@latencies = @latencies.concat(usersLatencies)
@latencies = _.uniq(@latencies)
@changed()
onLatencyFail:(jqXHR, user_ids) ->

View File

@ -114,6 +114,6 @@ SampleApp::Application.configure do
config.video_conferencing_host = "https://webrtc-demo.jamkazam.com"
config.use_video_conferencing_server = true
config.latency_data_host = "http://localhost:4001/dev"
config.latency_data_host = "http://localhost:4001/local"
config.latency_data_host_auth_code = "c2VydmVyOnBhc3N3b3Jk"
end