Mercurial > hg > webaudioevaluationtool
changeset 1168:c0022a09c4f6
Merge
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Mon, 01 Feb 2016 10:38:54 +0000 |
parents | f7da0ea7a4c1 (current diff) 0e28f9348205 (diff) |
children | 018539fa16c5 |
files | WAVE.js core.css core.js docs/Instructions/Instructions.pdf docs/Instructions/Instructions.tex example_eval/AB_example.xml example_eval/horizontal_example.xml example_eval/mushra_example.xml example_eval/project.xml example_eval/radio_example.xml index.html interfaces/AB.css interfaces/AB.js interfaces/ape.css interfaces/ape.js interfaces/blank.js interfaces/discrete.css interfaces/discrete.js interfaces/horizontal-sliders.css interfaces/horizontal-sliders.js interfaces/mushra.css interfaces/mushra.js loudness.js test-schema.xsd |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core.js Fri Jan 29 11:39:29 2016 +0000 +++ b/core.js Mon Feb 01 10:38:54 2016 +0000 @@ -2757,7 +2757,7 @@ // Update the playhead position, startPlay must be called if (this.timePerPixel > 0) { var time = this.playbackObject.getCurrentPosition(); - if (time > 0) { + if (time > 0 && time < this.maxTime) { var width = 490; var pix = Math.floor(time/this.timePerPixel); this.scrubberHead.style.left = pix+'px'; @@ -2873,6 +2873,7 @@ // Anchor is not set below console.log('Anchor node not below marker value'); alert('Please keep listening'); + this.storeErrorNode('Anchor node not below marker value'); return false; } } @@ -2888,7 +2889,8 @@ { if (ao.interfaceDOM.getValue() < (ao.specification.marker/100) && ao.specification.marker > 0) { // Anchor is not set below - console.log('Reference node not below marker value'); + console.log('Reference node not above marker value'); + this.storeErrorNode('Reference node not above marker value'); alert('Please keep listening'); return false; } @@ -2946,6 +2948,7 @@ } str_start += ". Please keep listening"; console.log("[ALERT]: "+str_start); + this.storeErrorNode("[ALERT]: "+str_start); alert(str_start); } }; @@ -2977,6 +2980,7 @@ str +='.'; alert(str); console.log(str); + this.storeErrorNode(str); return false; }; this.checkAllPlayed = function() @@ -3007,8 +3011,18 @@ str +='.'; alert(str); console.log(str); + this.storeErrorNode(str); return false; }; + + this.storeErrorNode = function(errorMessage) + { + var time = audioEngineContext.timer.getTestTime(); + var node = storage.document.createElement('error'); + node.setAttribute('time',time); + node.textContent = errorMessage; + testState.currentStore.XMLDOM.appendChild(node); + }; } function Storage()