quickblox 2.23.1-beta.4 → 2.23.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/quickblox.js
CHANGED
|
@@ -36938,34 +36938,38 @@ function _getStats(peer, lastResults, successCallback, errorCallback) {
|
|
|
36938
36938
|
|
|
36939
36939
|
function _applyStatReport(statistic, result, lastResults) {
|
|
36940
36940
|
var item;
|
|
36941
|
+
// mediaType is deprecated in the W3C webrtc-stats spec and replaced by kind.
|
|
36942
|
+
// Safari/WebKit omits mediaType on some reports and provides only kind, so we
|
|
36943
|
+
// normalize once and use it for both the statistic lookup and the 'video' check.
|
|
36944
|
+
var mediaType = result.mediaType || result.kind;
|
|
36941
36945
|
|
|
36942
36946
|
if (result.bytesReceived && result.type === 'inbound-rtp') {
|
|
36943
|
-
item = statistic.remote[
|
|
36947
|
+
item = statistic.remote[mediaType];
|
|
36944
36948
|
|
|
36945
36949
|
if (item) {
|
|
36946
36950
|
item.bitrate = _getBitratePerSecond(result, lastResults, false);
|
|
36947
36951
|
item.bytesReceived = result.bytesReceived;
|
|
36948
36952
|
item.packetsReceived = result.packetsReceived;
|
|
36949
36953
|
item.timestamp = result.timestamp;
|
|
36950
|
-
if (
|
|
36954
|
+
if (mediaType === 'video' && result.framerateMean) {
|
|
36951
36955
|
item.framesPerSecond = Math.round(result.framerateMean * 10) / 10;
|
|
36952
36956
|
}
|
|
36953
36957
|
} else {
|
|
36954
|
-
Helpers.traceWarning('_getStats: skipping inbound-rtp report with unknown mediaType: ' +
|
|
36958
|
+
Helpers.traceWarning('_getStats: skipping inbound-rtp report with unknown mediaType/kind: ' + mediaType);
|
|
36955
36959
|
}
|
|
36956
36960
|
} else if (result.bytesSent && result.type === 'outbound-rtp') {
|
|
36957
|
-
item = statistic.local[
|
|
36961
|
+
item = statistic.local[mediaType];
|
|
36958
36962
|
|
|
36959
36963
|
if (item) {
|
|
36960
36964
|
item.bitrate = _getBitratePerSecond(result, lastResults, true);
|
|
36961
36965
|
item.bytesSent = result.bytesSent;
|
|
36962
36966
|
item.packetsSent = result.packetsSent;
|
|
36963
36967
|
item.timestamp = result.timestamp;
|
|
36964
|
-
if (
|
|
36968
|
+
if (mediaType === 'video' && result.framerateMean) {
|
|
36965
36969
|
item.framesPerSecond = Math.round(result.framerateMean * 10) / 10;
|
|
36966
36970
|
}
|
|
36967
36971
|
} else {
|
|
36968
|
-
Helpers.traceWarning('_getStats: skipping outbound-rtp report with unknown mediaType: ' +
|
|
36972
|
+
Helpers.traceWarning('_getStats: skipping outbound-rtp report with unknown mediaType/kind: ' + mediaType);
|
|
36969
36973
|
}
|
|
36970
36974
|
} else if (result.type === 'local-candidate') {
|
|
36971
36975
|
item = statistic.local.candidate;
|
|
@@ -39719,7 +39723,7 @@ module.exports = StreamManagement;
|
|
|
39719
39723
|
*/
|
|
39720
39724
|
|
|
39721
39725
|
var config = {
|
|
39722
|
-
version: '2.23.1-beta.
|
|
39726
|
+
version: '2.23.1-beta.6',
|
|
39723
39727
|
buildNumber: '1179',
|
|
39724
39728
|
creds: {
|
|
39725
39729
|
'appId': 0,
|