@flashphoner/sfusdk-examples 2.0.228 → 2.0.230
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 +1 -1
- package/src/controller/parser.js +27 -19
package/package.json
CHANGED
package/src/controller/parser.js
CHANGED
|
@@ -82,20 +82,20 @@ const statsToGraph = function(stats) {
|
|
|
82
82
|
eIndex++;
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
|
|
85
|
+
participant.incomingTracks.forEach(function(track) {
|
|
86
86
|
g.edges.push({
|
|
87
87
|
id: 'e' + eIndex,
|
|
88
88
|
// Reference extremities:
|
|
89
89
|
source: wcsId,
|
|
90
90
|
target: participant.nickName,
|
|
91
|
-
label:
|
|
91
|
+
label: track.quality ? track.id + "-" + track.quality : track.id,
|
|
92
92
|
count: count++,
|
|
93
93
|
size: edgeSize,
|
|
94
94
|
type: edgeType,
|
|
95
95
|
color: fromServerColour
|
|
96
96
|
});
|
|
97
97
|
eIndex++;
|
|
98
|
-
}
|
|
98
|
+
})
|
|
99
99
|
});
|
|
100
100
|
return g;
|
|
101
101
|
}
|
|
@@ -155,14 +155,13 @@ const statsToTable = function(stats) {
|
|
|
155
155
|
let bitrate_out = 0;
|
|
156
156
|
let tracks_out = 0;
|
|
157
157
|
stats.participants.forEach(function(participant){
|
|
158
|
-
|
|
159
|
-
const srcTrack = src[tKey(
|
|
160
|
-
if (
|
|
161
|
-
|
|
158
|
+
participant.incomingTracks.forEach(function(track) {
|
|
159
|
+
const srcTrack = src[tKey(track.id, track.quality)];
|
|
160
|
+
if (srcTrack) {
|
|
161
|
+
bitrate_out += srcTrack.bitrate;
|
|
162
|
+
tracks_out++;
|
|
162
163
|
}
|
|
163
|
-
|
|
164
|
-
tracks_out++;
|
|
165
|
-
}
|
|
164
|
+
});
|
|
166
165
|
});
|
|
167
166
|
metrics.WCS.push(metricToTable("participants", stats.participants.length, NA));
|
|
168
167
|
metrics.WCS.push(metricToTable("bitrate_in", bitrate_in, NA));
|
|
@@ -175,6 +174,10 @@ const statsToTable = function(stats) {
|
|
|
175
174
|
let tracksOut = 0;
|
|
176
175
|
let bitrateIn = 0;
|
|
177
176
|
let bitrateOut = 0;
|
|
177
|
+
// Todo (Igor): this is shared counter across all outgoing tracks, there should be 'per-track' counters
|
|
178
|
+
let nackOut = 0;
|
|
179
|
+
let firOut = 0;
|
|
180
|
+
let pliOut = 0;
|
|
178
181
|
participant.outgoingTracks.forEach(function(track){
|
|
179
182
|
if (track.composite) {
|
|
180
183
|
for (const [key, value] of Object.entries(track.tracks)) {
|
|
@@ -186,22 +189,27 @@ const statsToTable = function(stats) {
|
|
|
186
189
|
pStats.push(trackToTable(track, participant.nickName, "NA"));
|
|
187
190
|
tracksOut++;
|
|
188
191
|
bitrateOut += track.bitrate;
|
|
192
|
+
firOut += track.feedbackStats.receivedFIR;
|
|
193
|
+
pliOut += track.feedbackStats.receivedPLI;
|
|
194
|
+
nackOut += track.feedbackStats.receivedNACK;
|
|
189
195
|
}
|
|
190
196
|
});
|
|
191
|
-
|
|
192
|
-
const srcTrack = src[tKey(
|
|
193
|
-
if (
|
|
194
|
-
|
|
197
|
+
participant.incomingTracks.forEach(function(track) {
|
|
198
|
+
const srcTrack = src[tKey(track.id, track.quality)];
|
|
199
|
+
if (srcTrack) {
|
|
200
|
+
pStats.push(trackToTable(srcTrack, srcTrack.nickName, track.quality || "NA"));
|
|
201
|
+
tracksIn++;
|
|
202
|
+
bitrateIn += srcTrack.bitrate;
|
|
195
203
|
}
|
|
196
|
-
|
|
197
|
-
tracksIn++;
|
|
198
|
-
bitrateIn += srcTrack.bitrate;
|
|
199
|
-
}
|
|
204
|
+
})
|
|
200
205
|
pStats.push(metricToTable("tracks_in", tracksIn, participant.nickName));
|
|
201
206
|
pStats.push(metricToTable("bitrate_in", bitrateIn, participant.nickName));
|
|
202
207
|
pStats.push(metricToTable("tracks_out", tracksOut, participant.nickName));
|
|
203
208
|
pStats.push(metricToTable("bitrate_out", bitrateOut, participant.nickName));
|
|
209
|
+
pStats.push(metricToTable("nack_out", nackOut, participant.nickName));
|
|
210
|
+
pStats.push(metricToTable("pli_out", pliOut, participant.nickName));
|
|
211
|
+
pStats.push(metricToTable("fir_out", firOut, participant.nickName));
|
|
204
212
|
metrics[participant.nickName] = pStats;
|
|
205
213
|
});
|
|
206
214
|
return metrics;
|
|
207
|
-
}
|
|
215
|
+
}
|