This is a demonstration of two bugs in Firefox (13.0.1 on Mac OS X 10.7.4).
Bug: When loading an audio file, Firefox throws canplay
and canplaythrough
events twice each. (Mac only.)
Solution: Firefox should only throw the canplay
and canplaythrough
events once each.
Bug: when the currentTime
property is set on an audio intance, it causes the canplay
and canplaythrough
events to fire. (Replicated on Mac and Windows.)
Solution: these canplay
and canplaythrough
events should only fire once each, when the audio can play at all, and when the audio can play all the way through (respectively).
All the code is here. View source or view it on GitHub.
Music by Joshua Morse.