Author: ygrego Date: 2015-03-30 12:29:32 +0000 (Mon, 30 Mar 2015) New Revision: 979 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/979 Log: Additon of clause "else" in case Unrealized for method "bindToCurrentChannel". Modified: oipf/js/impl/VideoBroadcastObject.js Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-03-30 12:02:50 UTC (rev 978) +++ oipf/js/impl/VideoBroadcastObject.js 2015-03-30 12:29:32 UTC (rev 979) @@ -324,15 +324,13 @@ //Call method to claim scarces resources if (currentChannel) { this._timer = oipf.utils.timeout(0) - .then(this.changePlayState.bind(this, this._CONNECTING)) - .then(this.setCurrentChannel.bind(this, currentChannel)) - .then(this.changePlayState.bind(this, this._PRESENTING)); + .then(this.changePlayState.bind(this, this._CONNECTING)) + .then(this.setCurrentChannel.bind(this, currentChannel)) + .then(this.changePlayState.bind(this, this._PRESENTING)); + } else { + this._timer = oipf.utils.timeout(0) + .then(this.changePlayState.bind(this, this._UNREALIZED, 100)); } - /* - * When there isn't channel presented, the video-broadcast - * object and his state equals to Unrealized, so it's not - * necessary to change its state. - */ break; case this._CONNECTING: