VRFS-2337 fix calculation of default audio latency
This commit is contained in:
parent
9ef7d2474f
commit
447c391324
|
|
@ -88,8 +88,8 @@
|
|||
|
||||
var fullScore = null;
|
||||
|
||||
if (response.last_jam_audio_latency && response.my_audio_latency && response.internet_score) {
|
||||
fullScore = response.last_jam_audio_latency + response.my_audio_latency + response.internet_score;
|
||||
if (response.internet_score) {
|
||||
fullScore = response.last_jam_audio_latency + calculateAudioLatency(response.my_audio_latency) + calculateAudioLatency(response.internet_score);
|
||||
}
|
||||
|
||||
// latency badge template needs these 2 properties
|
||||
|
|
@ -145,6 +145,14 @@
|
|||
});
|
||||
};
|
||||
|
||||
function calculateAudioLatency(latency) {
|
||||
if (!latency || latency === 0) {
|
||||
return 13;
|
||||
}
|
||||
|
||||
return latency;
|
||||
}
|
||||
|
||||
function configureActionButtons(user) {
|
||||
var btnFriendSelector = "#btnFriend";
|
||||
var btnFollowSelector = "#btnFollow";
|
||||
|
|
|
|||
Loading…
Reference in New Issue