comparison 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
comparison
equal deleted inserted replaced
545:ada2ec131505 546:df2d916fd9cf
257 this.playback.textContent = progress+'%'; 257 this.playback.textContent = progress+'%';
258 } else { 258 } else {
259 this.playback.textContent = "Play"; 259 this.playback.textContent = "Play";
260 } 260 }
261 }; 261 };
262 this.error = function() {
263 // audioObject has an error!!
264 this.playback.textContent = "Error";
265 $(this.playback).addClass("error-colour");
266 }
262 this.startPlayback = function() 267 this.startPlayback = function()
263 { 268 {
264 $('.comparator-button').text('Listen'); 269 $('.comparator-button').text('Listen');
265 $(this.playback).text('Stop'); 270 $(this.playback).text('Stop');
266 this.playback.setAttribute("playstate","playing"); 271 this.playback.setAttribute("playstate","playing");