|
@@ -646,7 +646,7 @@
|
|
this.fid;
|
|
this.fid;
|
|
this.audio = new Audio();
|
|
this.audio = new Audio();
|
|
// audio events
|
|
// audio events
|
|
- this.audio_events = ["loadedmetadata","canplay","playing","pause","timeupdate","ended"];
|
|
|
|
|
|
+ this.audio_events = ["loadedmetadata","canplay","playing","pause","timeupdate","ended","error"];
|
|
|
|
|
|
// UI dom objects
|
|
// UI dom objects
|
|
this.$container = $('<div id="audio-player">');
|
|
this.$container = $('<div id="audio-player">');
|
|
@@ -769,7 +769,7 @@
|
|
},
|
|
},
|
|
// audio functions
|
|
// audio functions
|
|
setSRC(url){
|
|
setSRC(url){
|
|
- // console.log('AudioPlayer setSRC : url', url);
|
|
|
|
|
|
+ console.log('AudioPlayer setSRC : url', url);
|
|
this.audio.src = url;
|
|
this.audio.src = url;
|
|
},
|
|
},
|
|
onLoadedmetadata(){
|
|
onLoadedmetadata(){
|
|
@@ -794,6 +794,9 @@
|
|
onCanplay(){
|
|
onCanplay(){
|
|
this.play();
|
|
this.play();
|
|
},
|
|
},
|
|
|
|
+ onError(){
|
|
|
|
+ console.warn("Audio Error " + this.audio.error.code + "; details: " + this.audio.error.message);
|
|
|
|
+ },
|
|
play(){
|
|
play(){
|
|
this.clearTimeOutToHide();
|
|
this.clearTimeOutToHide();
|
|
this.audio.play();
|
|
this.audio.play();
|