Moves render and ttfm connection times to the library.

This commit is contained in:
damencho 2016-08-05 09:52:09 -05:00
parent 6302e42229
commit 6651168dd3
1 changed files with 0 additions and 19 deletions

View File

@ -160,25 +160,6 @@ SmallVideo.createStreamElement = function (stream) {
element.id = SmallVideo.getStreamElementID(stream);
element.onplay = function () {
var type = (isVideo ? 'video' : 'audio');
var now = APP.connectionTimes[type + ".render"]
= window.performance.now();
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.conference.getConnectionTimes()["session.initiate"]
- APP.conference.getConnectionTimes()["muc.joined"]);
console.log("(TIME) TTFM " + type + ":\t", ttfm);
AnalyticsAdapter.sendEvent('ttfm.' + type, ttfm);
};
return element;
};