Author: ygrego Date: 2015-02-16 17:17:45 +0000 (Mon, 16 Feb 2015) New Revision: 810 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/810 Log: Beginning implementation of method "prevChannel". Modified: oipf/js/impl/VideoBroadcastObject.js Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-16 17:14:44 UTC (rev 809) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-16 17:17:45 UTC (rev 810) @@ -410,12 +410,54 @@ * */ prevChannel: function() { - var channelConfig = oipfObjectFactory.createChannelConfig(); - if (channelConfig === null){ - - + //claimed scarce resources + //Call method to claim scarces resources + + switch(this.playstate){ + + case 0: + break; + + case 1: + try{ + + if (channelConfig === null) { + + throw new Error(); + + } else { + + + } + + if (currentChan) { + + this.currentChannel = currentChan; + + } else { + + throw new Error(); + } + + } catch (e) { + //When the OITF does not maintain channel list and favourite list by itself + this.onChannelChangeError && this.onChannelChangeError(null, 10); + } + this.onPlayStateChange && this.onPlayStateChange(2, 20);//Parameter error here equals to 20 but not defined in the norm, means there is no error + break; + + case 2: + break; + + case 3: + + this.onPlayStateChange && this.onPlayStateChange(1); + + break; + } + return this.currentChannel; },
participants (1)
-
ygregoï¼ users.nuiton.org