Mercurial > hg > webaudioevaluationtool
comparison interfaces/AB.js @ 2732:d999a8fc26ea
#174: Fixed AB playback button text and locking
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 19 Apr 2017 10:26:56 +0100 |
parents | c74c698795a9 |
children | dff4b73459fc 789ce0944e4d |
comparison
equal
deleted
inserted
replaced
2730:a13adc8f8d3d | 2732:d999a8fc26ea |
---|---|
286 }; | 286 }; |
287 this.startPlayback = function () { | 287 this.startPlayback = function () { |
288 if (this.parent.specification.parent.playOne || specification.playOne) { | 288 if (this.parent.specification.parent.playOne || specification.playOne) { |
289 $('.comparator-button').text('Wait'); | 289 $('.comparator-button').text('Wait'); |
290 $('.comparator-button').attr("disabled", "true"); | 290 $('.comparator-button').attr("disabled", "true"); |
291 $(this.playback).css("disabled", "false"); | 291 $(this.playback).removeAttr("disabled"); |
292 } else { | 292 } else { |
293 $('.comparator-button').text('Listen'); | 293 $('.comparator-button').text('Listen'); |
294 } | 294 } |
295 $(this.playback).text('Stop'); | 295 $(this.playback).text('Stop'); |
296 this.playback.setAttribute("playstate", "playing"); | 296 this.playback.setAttribute("playstate", "playing"); |
297 interfaceContext.commentBoxes.highlightById(audioElement.id); | 297 interfaceContext.commentBoxes.highlightById(audioElement.id); |
298 }; | 298 }; |
299 this.stopPlayback = function () { | 299 this.stopPlayback = function () { |
300 if (this.playback.getAttribute("playstate") == "playing") { | 300 if (this.playback.getAttribute("playstate") == "playing") { |
301 $('.comparator-button').text('Listen'); | 301 $(this.playback).text('Listen'); |
302 $('.comparator-button').removeAttr("disabled"); | 302 $(this.playback).removeAttr("disabled"); |
303 this.playback.setAttribute("playstate", "ready"); | 303 this.playback.setAttribute("playstate", "ready"); |
304 if (this.parent.specification.parent.playOne || specification.playOne) { | |
305 $('.comparator-button').text('Listen'); | |
306 $('.comparator-button').removeAttr("disabled"); | |
307 } | |
304 } | 308 } |
305 var box = interfaceContext.commentBoxes.boxes.find(function (a) { | 309 var box = interfaceContext.commentBoxes.boxes.find(function (a) { |
306 return a.id === audioElement.id; | 310 return a.id === audioElement.id; |
307 }); | 311 }); |
308 if (box) { | 312 if (box) { |