* Much better flow for mciReady in relation to pausing, etc. using callbacks

This commit is contained in:
Bryan Ashby 2015-07-29 22:09:51 -06:00
parent 44a0f87a24
commit a15067fc21
4 changed files with 90 additions and 99 deletions

View file

@ -26,9 +26,15 @@ StandardMenuModule.prototype.beforeArt = function() {
StandardMenuModule.super_.prototype.beforeArt.call(this);
};
StandardMenuModule.prototype.mciReady = function(mciData) {
StandardMenuModule.super_.prototype.mciReady.call(this, mciData);
// we do this so other modules can be both customized and still perform standard tasks
StandardMenuModule.super_.prototype.standardMCIReadyHandler.call(this, mciData);
StandardMenuModule.prototype.mciReady = function(mciData, cb) {
var self = this;
StandardMenuModule.super_.prototype.mciReady.call(this, mciData, function mciReadyComplete(err) {
if(err) {
cb(err);
} else {
// we do this so other modules can be both customized and still perform standard tasks
StandardMenuModule.super_.prototype.standardMCIReadyHandler.call(self, mciData, cb);
}
});
};