Mercurial > hg > webaudioevaluationtool
comparison interfaces/ABX.js @ 2927:796daa52e3f8
Fix #224
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 06 Sep 2017 18:44:42 +0100 |
parents | cd1cd3358544 |
children | 270f20b2d68f |
comparison
equal
deleted
inserted
replaced
2926:151fae569ce9 | 2927:796daa52e3f8 |
---|---|
269 this.disabled = false; | 269 this.disabled = false; |
270 } | 270 } |
271 }; | 271 }; |
272 this.updateLoading = function (progress) { | 272 this.updateLoading = function (progress) { |
273 // progress is a value from 0 to 100 indicating the current download state of media files | 273 // progress is a value from 0 to 100 indicating the current download state of media files |
274 if (label == "X" || label == "x") { | |
275 this.playback.textContent = "Play"; | |
276 } | |
274 if (progress != 100) { | 277 if (progress != 100) { |
275 progress = String(progress); | 278 progress = String(progress); |
276 progress = progress.split('.')[0]; | 279 progress = progress.split('.')[0]; |
277 this.playback.textContent = progress + '%'; | 280 this.playback.textContent = progress + '%'; |
278 } else { | 281 } else { |
333 | 336 |
334 }; | 337 }; |
335 this.error = function () { | 338 this.error = function () { |
336 // If there is an error with the audioObject, this will be called to indicate a failure | 339 // If there is an error with the audioObject, this will be called to indicate a failure |
337 }; | 340 }; |
341 if (label == "X" || label == "x") { | |
342 this.enable(); | |
343 } | |
338 }; | 344 }; |
339 // Ensure there are only two comparisons per page | 345 // Ensure there are only two comparisons per page |
340 if (page.audioElements.length != 2) { | 346 if (page.audioElements.length != 2) { |
341 console.error('FATAL - There must be 2 <audioelement> nodes on each <page>: ' + page.id); | 347 console.error('FATAL - There must be 2 <audioelement> nodes on each <page>: ' + page.id); |
342 return; | 348 return; |