play/stop 1 creates an iframe in javascript, and sets the source to another HTML file that contains just:<html><head></head><body> <embed src="machinegun.wav" hidden="true" autostart="true"> </body></html>The stop button removes the iframe. | |
| play/stop 2 creates the embed object directly using javascript (createElement and setAttribute), then appends it to the body. The stop button removes this element, and clicking start again re-adds it. | |
| play/stop 3 is almost exactly like play/stop 2, except the stop button totally nixes the tag, and the play button always creates a new one. | |
| Opera | Safari | Firefox | IE6 | |
| button 1 | No sound whatsoever | Start and stop, but there's a slight delay | Start and stop, but there's a slight delay | No sound whatsoever - iframe won't even load |
| button 2 | No sound whatsoever | instant start but can't stop it | Instant start and stop! | Instant start and stop, but re-starting continues where you stopped it. |
| button 3 | No sound whatsoever | instant start but can't stop it | Instant start and stop! | Instant start and stop! |