From 381b764c4f1e64dbca3f46d220deb5be0956c2cc Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 25 Aug 2014 16:15:52 +0200 Subject: [PATCH] add GUM tracking --- app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app.js b/app.js index 16d5ba2d2..ed83638da 100644 --- a/app.js +++ b/app.js @@ -159,9 +159,17 @@ function obtainAudioAndVideoPermissions(callback) { ['audio', 'video'], function (avStream) { callback(avStream); + trackUsage('localMedia', { + audio: avStream.getAudioTracks().length, + video: avStream.getVideoTracks().length + }); }, function (error) { console.error('failed to obtain audio/video stream - stop', error); + trackUsage('localMediaError', { + media: error.media || 'video', + name : error.name + }); }, config.resolution || '360'); }