Adds analytics event and console log for TTFM (time to first media).
This commit is contained in:
parent
b457166726
commit
06c636311d
|
@ -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,12 @@ SmallVideo.createStreamElement = function (stream) {
|
|||
console.log("(TIME) Render " + type + ":\t",
|
||||
now);
|
||||
AnalyticsAdapter.sendEvent('render.' + type, now);
|
||||
|
||||
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