Author: ygrego Date: 2015-02-10 16:10:12 +0000 (Tue, 10 Feb 2015) New Revision: 788 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/788 Log: Implementation of method 'bindToCurrentChannel' when play state is setting to 'Unrealized'. Modified: oipf/js/impl/VideoBroadcastObject.js Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-10 14:18:44 UTC (rev 787) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-10 16:10:12 UTC (rev 788) @@ -112,6 +112,24 @@ */ allocationMethod: null, + /* + * Description: + * The channel currently being presented by this embedded object if the user has given permission to share this + * information, possibly through a mechanism outside the scope of this specification. If no channel is being + * presented, or if this information is not visible to the caller, the value of this property SHALL be null. + * The value of this property is not affected during timeshift operations and SHALL reflect the value prior to the + * start of a timeshift operation, for both local and network timeshift resources. + * + * Extensions to video/broadcast for current channel information: + * If an OITF has indicated support for extended tuner control (i.e. by giving value true to element + * <extendedAVControl> as specified in section 9.3.6 in its capability description), the OITF SHALL support the + * following additional properties and methods on the video/broadcast object. + * The functionality as described in this section is subject to the security model of section 10.1.3.8. + * Note the property onChannelScan and methods startScan and stopScan have been moved to section 7.13.9. + * + * Visibility Type: readonly Channel + */ + currentChannel: null, createdCallback: function() { console.log("[INFO] createdCallback called."); @@ -237,7 +255,7 @@ * (partially) managed by the OITF (i.e., if the channel list information is managed entirely in the network). */ getChannelConfig: function() { - + }, /* @@ -262,9 +280,36 @@ * from that channel is being presented. Applications should listen for the video/broadcast * object entering state 2 (“ presenting ”) in order to determine when audio or video is being * presented. + * + * TODO : binding of necessary ressources */ bindToCurrentChannel: function() { - + var channelConfig = this.getChannelConfig(); + var currentChan = channelConfig.currentChannel; + + switch(this.playstate){ + + case 0: + if (currentChannel) { + this.currentChannel = currentChan; + this.onPlayStateChange && this.onPlayStateChange(2); + return this.currentChannel; + } else { + this.onPlayStateChange && this.onPlayStateChange(0, 100); + } + break; + + case 1: + break; + + case 2: + break; + + case 3: + break; + + + } }, /*
participants (1)
-
ygrego@users.nuiton.org