HTML5 audio play event not firing.

Hi Clifton,
I don't think this has anything to do with Powerpac. Below is part of the code I use for making, playing and uploading audio files.
I have been using this for about three years now and until a couple of days ago it had always worked. The user makes a recording which is then played. I use the play event to trigger code in an object in the DHTML. It now seems that play is no longer being fired. Strangely this is the case with one part of the program but not others! I have tried triggering another object but this makes no difference. The problem seems to be in the audio object. Why would this suddenly cease to function? Fortunately it is not a catastrophe because the timeupdate event serves my purpose equally well but I find these mysterious changes worrying. Just because something works once doesn't mean that it will always work. Any ideas?
John
I don't think this has anything to do with Powerpac. Below is part of the code I use for making, playing and uploading audio files.
- Code: Select all
function endFile(blob, extension) {
if (extension == "wav") {
if (mySilent == false)
{
var url = URL.createObjectURL(blob);
var au = document.getElementById('myPlayer')
au.src = url;
au.play();
au.addEventListener('play',function(){
top.tbfunction_pgTBObjSet("pleaseWait","trigger");
});
au.addEventListener('ended',function(){
top.tbfunction_pgTBObjSet("ML1","trigger");
});
}
} else {
theBlob = blob;
top.tbfunction_pgTBObjSet("ML4","trigger");
}
}
};
I have been using this for about three years now and until a couple of days ago it had always worked. The user makes a recording which is then played. I use the play event to trigger code in an object in the DHTML. It now seems that play is no longer being fired. Strangely this is the case with one part of the program but not others! I have tried triggering another object but this makes no difference. The problem seems to be in the audio object. Why would this suddenly cease to function? Fortunately it is not a catastrophe because the timeupdate event serves my purpose equally well but I find these mysterious changes worrying. Just because something works once doesn't mean that it will always work. Any ideas?
John