daydreamer-json commited on
Commit
f5b2b6d
·
verified ·
1 Parent(s): c824aa7
Files changed (1) hide show
  1. gi_jukebox.html +8 -0
gi_jukebox.html CHANGED
@@ -180,6 +180,14 @@
180
  document.getElementById('trackInfo_albumName').textContent = BASE_SETTINGS.trackInfoLabel_loading;
181
  document.getElementById('trackInfo_artistName').textContent = BASE_SETTINGS.trackInfoLabel_loading;
182
  document.getElementById('trackInfo_copyright').textContent = BASE_SETTINGS.trackInfoLabel_loading;
 
 
 
 
 
 
 
 
183
  audioPlayer.on('load', function(){
184
  audioPlayer.play();
185
  document.getElementById('h1string1').addEventListener('click', playAudio);
 
180
  document.getElementById('trackInfo_albumName').textContent = BASE_SETTINGS.trackInfoLabel_loading;
181
  document.getElementById('trackInfo_artistName').textContent = BASE_SETTINGS.trackInfoLabel_loading;
182
  document.getElementById('trackInfo_copyright').textContent = BASE_SETTINGS.trackInfoLabel_loading;
183
+ audioPlayer.on('loaderror', function(){
184
+ console.error('Audio "loaderror" has occured. Retrying ...');
185
+ playAudio();
186
+ });
187
+ audioPlayer.on('playerror', function(){
188
+ console.error('Audio "playerror" has occured. Retrying ...');
189
+ playAudio();
190
+ });
191
  audioPlayer.on('load', function(){
192
  audioPlayer.play();
193
  document.getElementById('h1string1').addEventListener('click', playAudio);