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) {