Mercurial > hg > webaudioevaluationtool
changeset 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 | ea6424dc5f04 |
files | core.js example_eval/project.xml |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
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) {
--- a/example_eval/project.xml Thu May 28 19:27:39 2015 +0100 +++ b/example_eval/project.xml Fri May 29 16:27:05 2015 +0100 @@ -18,7 +18,7 @@ <metricEnable>elementFlagMoved</metricEnable> </Metric> </setup> - <audioHolder id='0' hostURL="example_eval/" sampleRate="44100" randomiseOrder='true' repeatCount='0' loop='true' elementComments='true'> + <audioHolder id='0' hostURL="example_eval/" sampleRate="44100" randomiseOrder='true' repeatCount='0' loop='false' elementComments='true'> <interface> <title>Example Test Question</title> <scale position="0">Min</scale>