Merge branch 'VRFS-5181_latency_in_musician_hover_bubble' of bitbucket.org:jamkazam/jam-cloud into VRFS-5181_latency_in_musician_hover_bubble
This commit is contained in:
commit
1906e9a110
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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) ->
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue