In javascript, I have such a code:
var sound = new audio (name ); Sound.onended = function () {warning ("end"); } Sound.play (); It is after the sound.play method is over, I want to be alert that it has expired. It works in IE9, but is there a way to do it in Chrome?
I have also tried to callback like the code given below, but it does not work
sound Play (function () {alert ("end")});
Since you are using jQuery, by using something like this Consider. This will make your event very easy and consistent across the browser, it uses HTML5 audio on HTML5 browsers that support and flash it on a browser which does not support HTML5 audio. You can also use it.
If you use HTML5 audio manually then remember that Firefox and Opera do not support MP3, they support OG Vorbis, Safari and IE do not support Ogg Vorbis but Support MP3. Chrome supports both MP3 and Ogg Wharbis, but does not support WAV. Do you try to play WAV on any occasion? If you do this then it will not work on Chrome.
Comments
Post a Comment