safer and simpler calls to player functions
removed deprecated event "onApiLoaded"