Mercurial > hg > webaudioevaluationtool
comparison interfaces/discrete.js @ 2113:d2abe3b139d2
Interfaces report error if audio cannot be loaded/decoded/played
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Mon, 22 Feb 2016 15:48:28 +0000 |
parents | 03b2ff7308fa |
children | 943b0ba7ec83 |
comparison
equal
deleted
inserted
replaced
2112:705025e30784 | 2113:d2abe3b139d2 |
---|---|
376 // Use storage.document.createElement('value'); to generate the XML node. | 376 // Use storage.document.createElement('value'); to generate the XML node. |
377 var node = storage.document.createElement('value'); | 377 var node = storage.document.createElement('value'); |
378 node.textContent = this.getValue(); | 378 node.textContent = this.getValue(); |
379 return node; | 379 return node; |
380 }; | 380 }; |
381 this.error = function() { | |
382 // audioObject has an error!! | |
383 this.playback.textContent = "Error"; | |
384 $(this.playback).addClass("error-colour"); | |
385 } | |
381 }; | 386 }; |
382 | 387 |
383 function outsideReferenceDOM(audioObject,index,inject) | 388 function outsideReferenceDOM(audioObject,index,inject) |
384 { | 389 { |
385 this.parent = audioObject; | 390 this.parent = audioObject; |
444 }; | 449 }; |
445 this.canMove = function() | 450 this.canMove = function() |
446 { | 451 { |
447 return false; | 452 return false; |
448 }; | 453 }; |
454 this.error = function() { | |
455 // audioObject has an error!! | |
456 this.outsideReferenceHolder.textContent = "Error"; | |
457 $(this.outsideReferenceHolder).addClass("error-colour"); | |
458 } | |
449 } | 459 } |
450 | 460 |
451 function resizeWindow(event) | 461 function resizeWindow(event) |
452 { | 462 { |
453 // Called on every window resize event, use this to scale your page properly | 463 // Called on every window resize event, use this to scale your page properly |