If you want to listen for the end of an audio track, calling 
MediaBase.addEndedHandler won't work, as it is using BrowserEvents.ENDED 
which is set to "ended".

The correct event is actually "onended".  Ref:  
http://www.w3schools.com/tags/av_event_ended.asp

So, here is a little JSNI function to do it:

public static native final void listenForEnd(AudioElement aud, Command 
onComplete) /*-{
   aud.onended = function() {
      [email protected]::execute(*)();
   };
}-*/;


Hope that helps someone.

Cheers.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to