Mercurial > hg > webaudioevaluationtool
diff core.js @ 139:04fcd51441e5
Bug #1258 Fixed. audioObject.metric.startListening now writes to console.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 29 May 2015 16:27:05 +0100 |
parents | c849dcbe71aa |
children | 7168f3616a00 |
line wrap: on
line diff
--- a/core.js Thu May 28 19:27:39 2015 +0100 +++ b/core.js Fri May 29 16:27:05 2015 +0100 @@ -511,7 +511,7 @@ this.id = id; this.state = 0; // 0 - no data, 1 - ready this.url = null; // Hold the URL given for the output back to the results. - this.metric = new metricTracker(); + this.metric = new metricTracker(this); this.played = false; @@ -654,7 +654,7 @@ this.initialiseTest = function(){}; } -function metricTracker() +function metricTracker(caller) { /* Custom object to track and collect metric data * Used only inside the audioObjects object. @@ -668,6 +668,7 @@ this.wasListenedTo = false; this.wasMoved = false; this.hasComments = false; + this.parent = caller; this.initialised = function(position) { @@ -689,8 +690,9 @@ this.wasListenedTo = true; this.listenStart = time; this.listenHold = true; - } - } + console.log('slider ' + this.parent.id + ' played (' + time + ')'); // DEBUG/SAFETY: show played slider id + } + }; this.stopListening = function(time) {