|
|
@@ -214,11 +214,18 @@ export default class JitsiRemoteTrack extends JitsiTrack {
|
|
214
|
214
|
console.log(`(TIME) Render ${type}:\t`, now);
|
|
215
|
215
|
this.conference.getConnectionTimes()[`${type}.render`] = now;
|
|
216
|
216
|
|
|
|
217
|
+ // The conference can be started without calling GUM
|
|
|
218
|
+ // FIXME if there would be a module for connection times this kind
|
|
|
219
|
+ // of logic (gumDuration or ttfm) should end up there
|
|
|
220
|
+ const gumStart = window.connectionTimes['obtainPermissions.start'];
|
|
|
221
|
+ const gumEnd = window.connectionTimes['obtainPermissions.end'];
|
|
|
222
|
+ const gumDuration
|
|
|
223
|
+ = !isNaN(gumEnd) && !isNaN(gumStart) ? gumEnd - gumStart : 0;
|
|
|
224
|
+
|
|
217
|
225
|
const ttfm = now
|
|
218
|
226
|
- (this.conference.getConnectionTimes()['session.initiate']
|
|
219
|
227
|
- this.conference.getConnectionTimes()['muc.joined'])
|
|
220
|
|
- - (window.connectionTimes['obtainPermissions.end']
|
|
221
|
|
- - window.connectionTimes['obtainPermissions.start']);
|
|
|
228
|
+ - gumDuration;
|
|
222
|
229
|
|
|
223
|
230
|
this.conference.getConnectionTimes()[`${type}.ttfm`] = ttfm;
|
|
224
|
231
|
console.log(`(TIME) TTFM ${type}:\t`, ttfm);
|