Mercurial > hg > webaudioevaluationtool
comparison interfaces/AB.js @ 478:bc343b3f4cce Dev_main
Minor fixes for OSX Firefox support (Firefox 43)
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Thu, 14 Jan 2016 15:37:38 +0000 |
parents | 1330c77d212c |
children | 92f26057b934 |
comparison
equal
deleted
inserted
replaced
477:c73f3540db59 | 478:bc343b3f4cce |
---|---|
135 this.playback.className = 'comparitor-button'; | 135 this.playback.className = 'comparitor-button'; |
136 this.playback.disabled = true; | 136 this.playback.disabled = true; |
137 this.playback.textContent = "Listen"; | 137 this.playback.textContent = "Listen"; |
138 this.box.appendChild(this.selector); | 138 this.box.appendChild(this.selector); |
139 this.box.appendChild(this.playback); | 139 this.box.appendChild(this.playback); |
140 this.selector.onclick = function() | 140 this.selector.onclick = function(event) |
141 { | 141 { |
142 var time = audioEngineContext.timer.getTestTime(); | 142 var time = audioEngineContext.timer.getTestTime(); |
143 if ($(event.currentTarget).hasClass('disabled')) | 143 if ($(event.currentTarget).hasClass('disabled')) |
144 { | 144 { |
145 console.log("Please wait until sample has loaded"); | 145 console.log("Please wait until sample has loaded"); |
165 } | 165 } |
166 obj.parent.metric.moved(time,obj.value); | 166 obj.parent.metric.moved(time,obj.value); |
167 } | 167 } |
168 console.log("Selected "+id+' ('+time+')'); | 168 console.log("Selected "+id+' ('+time+')'); |
169 }; | 169 }; |
170 this.playback.onclick = function() | 170 this.playback.onclick = function(event) |
171 { | 171 { |
172 $('.comparitor-button').text('Listen'); | 172 $('.comparitor-button').text('Listen'); |
173 var id = event.currentTarget.parentElement.getAttribute('track-id'); | 173 var id = event.currentTarget.parentElement.getAttribute('track-id'); |
174 audioEngineContext.play(id); | 174 audioEngineContext.play(id); |
175 $(event.currentTarget).text('Playing'); | 175 $(event.currentTarget).text('Playing'); |