# HG changeset patch # User Nicholas Jillings # Date 1464358367 -3600 # Node ID 77404bde464c32133348dd418b2b45c7caac12e7 # Parent c859ec64accab8b6a2300d69c46355901b4a2f5f Implemented #29 for AB diff -r c859ec64acca -r 77404bde464c interfaces/AB.js --- a/interfaces/AB.js Fri May 27 14:58:20 2016 +0100 +++ b/interfaces/AB.js Fri May 27 15:12:47 2016 +0100 @@ -315,14 +315,23 @@ } this.startPlayback = function() { - $('.comparator-button').text('Listen'); + if (this.parent.specification.parent.playOne || specification.playOne) { + $('.comparator-button').text('Wait'); + $('.comparator-button').attr("disabled","true"); + $(this.playback).css("disabled","false"); + } else { + $('.comparator-button').text('Listen'); + } $(this.playback).text('Stop'); this.playback.setAttribute("playstate","playing"); }; this.stopPlayback = function() { - $(this.playback).text('Listen'); - this.playback.setAttribute("playstate","ready"); + if (this.playback.getAttribute("playstate") == "playing") { + $('.comparator-button').text('Listen'); + $('.comparator-button').removeAttr("disabled"); + this.playback.setAttribute("playstate","ready"); + } }; this.exportXMLDOM = function(audioObject) { diff -r c859ec64acca -r 77404bde464c js/specification.js --- a/js/specification.js Fri May 27 14:58:20 2016 +0100 +++ b/js/specification.js Fri May 27 15:12:47 2016 +0100 @@ -13,6 +13,7 @@ this.crossFade = null; this.preSilence = null; this.postSilence = null; + this.playOne = null; // nodes this.metrics = null; @@ -448,6 +449,7 @@ this.preTest = null; this.postTest = null; this.interfaces = []; + this.playOne = null; this.commentBoxPrefix = "Comment on track"; this.audioElements = []; this.commentQuestions = []; diff -r c859ec64acca -r 77404bde464c tests/examples/AB_example.xml --- a/tests/examples/AB_example.xml Fri May 27 14:58:20 2016 +0100 +++ b/tests/examples/AB_example.xml Fri May 27 15:12:47 2016 +0100 @@ -1,6 +1,6 @@ - + Please enter your name. diff -r c859ec64acca -r 77404bde464c xml/test-schema.xsd --- a/xml/test-schema.xsd Fri May 27 14:58:20 2016 +0100 +++ b/xml/test-schema.xsd Fri May 27 15:12:47 2016 +0100 @@ -26,6 +26,8 @@ + + @@ -62,6 +64,7 @@ + @@ -97,6 +100,7 @@ +