Mercurial > hg > webaudioevaluationtool
comparison mushra.js @ 759:801e1977ab55
MUSHRA: Loading progress feedback
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Thu, 17 Dec 2015 16:29:49 +0000 |
parents | 57a3cbf90e01 |
children | 01c026742e1e |
comparison
equal
deleted
inserted
replaced
758:57a3cbf90e01 | 759:801e1977ab55 |
---|---|
193 var id = Number(this.parentNode.getAttribute('trackIndex')); | 193 var id = Number(this.parentNode.getAttribute('trackIndex')); |
194 audioEngineContext.audioObjects[id].metric.moved(time,this.value); | 194 audioEngineContext.audioObjects[id].metric.moved(time,this.value); |
195 console.log('slider '+id+' moved to '+this.value+' ('+time+')'); | 195 console.log('slider '+id+' moved to '+this.value+' ('+time+')'); |
196 }; | 196 }; |
197 | 197 |
198 this.play.textContent = "Play"; | 198 this.play.textContent = "Loading..."; |
199 this.play.value = audioObject.id; | 199 this.play.value = audioObject.id; |
200 this.play.style.float = "left"; | 200 this.play.style.float = "left"; |
201 this.play.style.width = "100%"; | 201 this.play.style.width = "100%"; |
202 this.play.disabled = true; | 202 this.play.disabled = true; |
203 this.play.onclick = function(event) | 203 this.play.onclick = function(event) |
209 $(event.currentTarget.parentElement).addClass('track-slider-playing'); | 209 $(event.currentTarget.parentElement).addClass('track-slider-playing'); |
210 }; | 210 }; |
211 | 211 |
212 this.enable = function() { | 212 this.enable = function() { |
213 this.play.disabled = false; | 213 this.play.disabled = false; |
214 this.play.textContent = "Play"; | |
214 $(this.slider).removeClass('track-slider-disabled'); | 215 $(this.slider).removeClass('track-slider-disabled'); |
215 }; | 216 }; |
216 | 217 |
217 this.exportXMLDOM = function(audioObject) { | 218 this.exportXMLDOM = function(audioObject) { |
218 // Called by the audioObject holding this element. Must be present | 219 // Called by the audioObject holding this element. Must be present |
226 | 227 |
227 this.resize = function(event) | 228 this.resize = function(event) |
228 { | 229 { |
229 this.holder.style.height = window.innerHeight-200 + 'px'; | 230 this.holder.style.height = window.innerHeight-200 + 'px'; |
230 this.slider.style.height = window.innerHeight-250 + 'px'; | 231 this.slider.style.height = window.innerHeight-250 + 'px'; |
232 } | |
233 this.updateLoading = function(progress) | |
234 { | |
235 progress = String(progress); | |
236 progress = progress.substr(0,5); | |
237 this.play.textContent = "Loading: "+progress+"%"; | |
231 } | 238 } |
232 | 239 |
233 if (this.parent.state == 1) | 240 if (this.parent.state == 1) |
234 { | 241 { |
235 this.enable(); | 242 this.enable(); |