I am trying to get an event to fire when a movie finishes playing. The movie appears when a link is clicked and is in a dojo dialog. I am using the tag to play the movie and have attempted to use dojo connect to have an alert appear when the movie finishes playing by using the onEnded attribute. However nothing happens. Any ideas on what my problem is? Code is as follows:
dialog = new dijit.Dialog({
content: "<embed id='video' src='http://www.tizag.com/files/html/htmlexample.mpeg' autostart='true' controller='false'/>"
});
dialog.show();
dojo.connect(dojo.byId("video"), "onEnded", function(e){alert(e);});