I believe I understood what is going on:

1- Why is 'endofstream' (and all other events) being compared to a parameter received by the method 'void New(nsPluginInstance * instance, nsPluginCreateData * parameters)'? Is this function called at every event mplayer issues?
When the plugin starts, it receives all the [embed] tag attributes in the form of parameters in this New() function. Some of these parameters are the on* events, such as onendofstream, together with the text of the javascript function that should be executed at each such event.
 
2- When does mplayerplug-in actually calls the javascript function? It seems that it is at the NPN_GetURL(...) in plugin.cpp , but I'm not sure at all.
3- What is the actual content of mediaCompleteCallback, onDestroyCallback etc? Is it a url? It looks strange.
NPN_GetURL(...) calls back the javascript function (received as a parameter in (1) and permanently stored as text in mediaCompleteCallback, onDestroyCallback etc variables) at the moment some backend event is being processed by the plugin (such as the stop button, end of stream etc). Nice.