diff 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
line wrap: on
line diff
--- a/interfaces/discrete.js	Mon Feb 22 15:05:39 2016 +0000
+++ b/interfaces/discrete.js	Mon Feb 22 15:48:28 2016 +0000
@@ -378,6 +378,11 @@
 		node.textContent = this.getValue();
 		return node;
 	};
+    this.error = function() {
+            // audioObject has an error!!
+        this.playback.textContent = "Error";
+        $(this.playback).addClass("error-colour");
+    }
 };
 
 function outsideReferenceDOM(audioObject,index,inject)
@@ -446,6 +451,11 @@
 	{
 		return false;
 	};
+    this.error = function() {
+            // audioObject has an error!!
+        this.outsideReferenceHolder.textContent = "Error";
+        $(this.outsideReferenceHolder).addClass("error-colour");
+    }
 }
 
 function resizeWindow(event)