Mercurial > hg > webaudioevaluationtool
comparison interfaces/horizontal-sliders.js @ 546:df2d916fd9cf Dev_main
Interfaces report error if audio cannot be loaded/decoded/played
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Mon, 22 Feb 2016 15:48:28 +0000 |
parents | 8d01d2bf4b8f |
children | aa55372146a0 |
comparison
equal
deleted
inserted
replaced
545:ada2ec131505 | 546:df2d916fd9cf |
---|---|
329 // Use storage.document.createElement('value'); to generate the XML node. | 329 // Use storage.document.createElement('value'); to generate the XML node. |
330 var node = storage.document.createElement('value'); | 330 var node = storage.document.createElement('value'); |
331 node.textContent = this.slider.value; | 331 node.textContent = this.slider.value; |
332 return node; | 332 return node; |
333 }; | 333 }; |
334 this.error = function() { | |
335 // audioObject has an error!! | |
336 this.playback.textContent = "Error"; | |
337 $(this.playback).addClass("error-colour"); | |
338 } | |
334 }; | 339 }; |
335 | 340 |
336 function outsideReferenceDOM(audioObject,index,inject) | 341 function outsideReferenceDOM(audioObject,index,inject) |
337 { | 342 { |
338 this.parent = audioObject; | 343 this.parent = audioObject; |
392 }; | 397 }; |
393 this.canMove = function() | 398 this.canMove = function() |
394 { | 399 { |
395 return false; | 400 return false; |
396 }; | 401 }; |
402 this.error = function() { | |
403 // audioObject has an error!! | |
404 this.outsideReferenceHolder.textContent = "Error"; | |
405 $(this.outsideReferenceHolder).addClass("error-colour"); | |
406 } | |
397 } | 407 } |
398 | 408 |
399 function resizeWindow(event) | 409 function resizeWindow(event) |
400 { | 410 { |
401 // Called on every window resize event, use this to scale your page properly | 411 // Called on every window resize event, use this to scale your page properly |