Author: ygrego Date: 2015-02-20 09:37:23 +0000 (Fri, 20 Feb 2015) New Revision: 837 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/837 Log: Addition of a variable called "self" into method "bindToCurrentChannel" in order to call method "onPlayStateChange". Modified: oipf/js/impl/VideoBroadcastObject.js Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-19 17:00:51 UTC (rev 836) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-20 09:37:23 UTC (rev 837) @@ -276,24 +276,24 @@ bindToCurrentChannel: function () { var channelConfig = this.getChannelConfig(); var currentChan = channelConfig.currentChannel; - + var self = this; switch (this.playstate) { - + case 0: //claimed scarce resources //Call method to claim scarces resources - + if (currentChan) { - this.currentChannel = currentChan; + setTimeout(function () { - this.onPlayStateChange && this.onPlayStateChange(2);//Parameter error here equals to 20 but not defined in the norm, means there is no error + self.onPlayStateChange && self.onPlayStateChange(2);//Parameter error here equals to 20 but not defined in the norm, means there is no error }, 0); } else { setTimeout(function () { - this.onPlayStateChange && this.onPlayStateChange(0, 100); + self.onPlayStateChange && self.onPlayStateChange(0, 100); }, 0); } break; @@ -306,7 +306,7 @@ case 3: setTimeout(function () { - this.onPlayStateChange && this.onPlayStateChange(1); + self.onPlayStateChange && self.onPlayStateChange(1); }, 0); break;
participants (1)
-
ygregoï¼ users.nuiton.org