Merge pull request #769 from jitsi/ttfm
Adds analytics event and console log for TTFM (time to first media).
This commit is contained in:
commit
c7710bfe1c
|
@ -628,6 +628,12 @@ export default {
|
|||
sendFeedback (overallFeedback, detailedFeedback) {
|
||||
return room.sendFeedback (overallFeedback, detailedFeedback);
|
||||
},
|
||||
/**
|
||||
* Returns the connection times stored in the library.
|
||||
*/
|
||||
getConnectionTimes () {
|
||||
return this._room.getConnectionTimes();
|
||||
},
|
||||
// used by torture currently
|
||||
isJoined () {
|
||||
return this._room
|
||||
|
|
|
@ -167,6 +167,17 @@ SmallVideo.createStreamElement = function (stream) {
|
|||
console.log("(TIME) Render " + type + ":\t",
|
||||
now);
|
||||
AnalyticsAdapter.sendEvent('render.' + type, now);
|
||||
|
||||
// Time to first media, a number that can be used for comparision of
|
||||
// time fot rendering media. It can be used for the first and
|
||||
// the rest participants. It subtracts the period of waiting for the
|
||||
// second participant to join (time between join and first
|
||||
// session initiate).
|
||||
var ttfm = now - APP.connectionTimes["document.ready"]
|
||||
- (APP.conference.getConnectionTimes()["session.initiate"]
|
||||
- APP.conference.getConnectionTimes()["muc.joined"]);
|
||||
console.log("(TIME) TTFM " + type + ":\t", ttfm);
|
||||
AnalyticsAdapter.sendEvent('ttfm.' + type, ttfm);
|
||||
};
|
||||
return element;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue