diff interfaces/AB.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 ada2ec131505
children aa55372146a0
line wrap: on
line diff
--- a/interfaces/AB.js	Mon Feb 22 15:05:39 2016 +0000
+++ b/interfaces/AB.js	Mon Feb 22 15:48:28 2016 +0000
@@ -259,6 +259,11 @@
 				this.playback.textContent = "Play";
 			}
 		};
+        this.error = function() {
+            // audioObject has an error!!
+            this.playback.textContent = "Error";
+            $(this.playback).addClass("error-colour");
+        }
         this.startPlayback = function()
         {
             $('.comparator-button').text('Listen');