diff interfaces/ape.js @ 1205:0e49d874ba97

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 a4ad9e55b5b8
children 943b0ba7ec83
line wrap: on
line diff
--- a/interfaces/ape.js	Mon Feb 22 15:05:39 2016 +0000
+++ b/interfaces/ape.js	Mon Feb 22 15:48:28 2016 +0000
@@ -644,6 +644,11 @@
 	{
 		return true;
 	};
+    this.error = function() {
+            // audioObject has an error!!
+        this.playback.textContent = "Error";
+        $(this.playback).addClass("error-colour");
+    }
 }
 
 function outsideReferenceDOM(audioObject,index,inject)
@@ -713,6 +718,11 @@
 	{
 		return false;
 	};
+    this.error = function() {
+            // audioObject has an error!!
+        this.outsideReferenceHolder.textContent = "Error";
+        $(this.outsideReferenceHolder).addClass("error-colour");
+    }
 }
 
 function buttonSubmitClick()