From f9daa25a6c9330e785c821c5704700410dd78caf Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Thu, 30 Oct 2014 10:18:08 +0200 Subject: [PATCH] Fixes the issue with the IPv6 addresses in connection quality tooltips. --- connectionquality.js | 7 +++++++ videolayout.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/connectionquality.js b/connectionquality.js index c6e78e31e..4931631da 100644 --- a/connectionquality.js +++ b/connectionquality.js @@ -116,5 +116,12 @@ var ConnectionQuality = (function () { VideoLayout.onStatsStop(); }; + /** + * Returns the local statistics. + */ + ConnectionQuality.getStats = function () { + return stats; + } + return ConnectionQuality; })(); \ No newline at end of file diff --git a/videolayout.js b/videolayout.js index 968c7d265..63017463c 100644 --- a/videolayout.js +++ b/videolayout.js @@ -1643,12 +1643,12 @@ var VideoLayout = (function (my) { ConnectionIndicator.getIP = function(value) { - return value.substring(0, value.indexOf(":")); + return value.substring(0, value.lastIndexOf(":")); }; ConnectionIndicator.getPort = function(value) { - return value.substring(value.indexOf(":") + 1, value.length); + return value.substring(value.lastIndexOf(":") + 1, value.length); }; ConnectionIndicator.getStringFromArray = function (array) {