PDA

View Full Version : Event listeners on Non-Ext Components



rainerh
22 Jun 2010, 9:57 AM
Hello everybody,

I want to attach some listeners to an HTML5 Audio object. As I've feared it is not possible to a simple


Ext.fly(myAudio).on('loadeddata', alert('Audio loaded'))


Is there some other way or do I have to use the generic javascript functions?

Greetings and thanks in advance

Animal
22 Jun 2010, 1:34 PM
You can add listeners like that.

Animal
22 Jun 2010, 1:39 PM
Of course if the readyState is already >= HAVE_CURRENT_DATA the event won't fire, and you should just execute the handler's function immediately.

http://www.whatwg.org/specs/web-apps/current-work/#event-media-loadeddata

http://www.whatwg.org/specs/web-apps/current-work/#dom-media-have_current_data

rainerh
13 Jul 2010, 5:39 AM
Hello there. I'm a little bit late but thank you very much for your answer!