Mercurial > hg > webaudioevaluationtool
comparison interfaces/AB.js @ 2436:25c1436706af
Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool
author | www-data <www-data@sucuk.dcs.qmul.ac.uk> |
---|---|
date | Thu, 02 Jun 2016 14:20:55 +0100 |
parents | 77404bde464c |
children | 8273da734d07 |
comparison
equal
deleted
inserted
replaced
2424:d479fdc7221c | 2436:25c1436706af |
---|---|
313 this.playback.textContent = "Error"; | 313 this.playback.textContent = "Error"; |
314 $(this.playback).addClass("error-colour"); | 314 $(this.playback).addClass("error-colour"); |
315 } | 315 } |
316 this.startPlayback = function() | 316 this.startPlayback = function() |
317 { | 317 { |
318 $('.comparator-button').text('Listen'); | 318 if (this.parent.specification.parent.playOne || specification.playOne) { |
319 $('.comparator-button').text('Wait'); | |
320 $('.comparator-button').attr("disabled","true"); | |
321 $(this.playback).css("disabled","false"); | |
322 } else { | |
323 $('.comparator-button').text('Listen'); | |
324 } | |
319 $(this.playback).text('Stop'); | 325 $(this.playback).text('Stop'); |
320 this.playback.setAttribute("playstate","playing"); | 326 this.playback.setAttribute("playstate","playing"); |
321 }; | 327 }; |
322 this.stopPlayback = function() | 328 this.stopPlayback = function() |
323 { | 329 { |
324 $(this.playback).text('Listen'); | 330 if (this.playback.getAttribute("playstate") == "playing") { |
325 this.playback.setAttribute("playstate","ready"); | 331 $('.comparator-button').text('Listen'); |
332 $('.comparator-button').removeAttr("disabled"); | |
333 this.playback.setAttribute("playstate","ready"); | |
334 } | |
326 }; | 335 }; |
327 this.exportXMLDOM = function(audioObject) | 336 this.exportXMLDOM = function(audioObject) |
328 { | 337 { |
329 var node = storage.document.createElement('value'); | 338 var node = storage.document.createElement('value'); |
330 node.textContent = this.value; | 339 node.textContent = this.value; |