add GUM tracking

This commit is contained in:
Philipp Hancke 2014-08-25 16:15:52 +02:00
parent 2d07ba1141
commit 381b764c4f
1 changed files with 8 additions and 0 deletions

8
app.js
View File

@ -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');
}