Author: ygrego Date: 2015-02-02 12:40:08 +0000 (Mon, 02 Feb 2015) New Revision: 756 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/756 Log: Deleting of image 'video-broadcast' because there isn't information about her licence. Removed: oipf/view/img/video-broadcast.jpg Modified: oipf/js/impl/OipfObjectFactory.js oipf/js/impl/VideoBroadcastObject.js Modified: oipf/js/impl/OipfObjectFactory.js =================================================================== --- oipf/js/impl/OipfObjectFactory.js 2015-02-02 11:50:35 UTC (rev 755) +++ oipf/js/impl/OipfObjectFactory.js 2015-02-02 12:40:08 UTC (rev 756) @@ -78,6 +78,7 @@ * Element <video_broadcast | |createChannelList() * type="ID_IPTV_SDS"> is set as | | * defined in section 9.3.6. | | + * ------------------------------------------------------------------------ */ channelConfig: null, Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-02 11:50:35 UTC (rev 755) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-02 12:40:08 UTC (rev 756) @@ -1,4 +1,4 @@ -/*! + /* * Description: * If the object type is supported, this method shall return an instance of the * corresponding embedded object. @@ -27,29 +27,102 @@ */ var VideoBroadcastObject = Class.extend({ + /* + * Description: + * The width of the area used for rendering the video object. This property is only writable if property + * fullScreen has value false . Changing the width property corresponds to changing the width property + * through the HTMLObjectElement interface, and must have the same effect as changing the width through + * the DOM Level 2 Style interfaces (i.e. CSS2Properties interface style.width ), at least for values + * specified in pixels. + */ width: null, + /* + * Description: + * The height of the area used for rendering the video object. This property is only writable if property + * fullScreen has value false . Changing the height property corresponds to changing the height property + * through the HTMLObjectElement interface, and must have the same effect as changing the height through + * the DOM Level 2 Style interfaces (i.e. CSS2Properties interface style.height ), at least for values + * specified in pixels. + */ heigth: null, + /* + * Description: + * Returns true if this video object is in full-screen mode, false otherwise. The default value is false . + * Visibilité Type: readonly Boolean + */ + fullScreen: null, + + /* + * Description: + * Setting the value of the data property SHALL have no effect on the video/broadcast object. If this property + * is read, the value returned SHALL always be the empty string. + * Type: String + */ + data: null, + + /*! + * Description: + * Visibility Type: readonly Integer + * The current play state of the video/broadcast object. Valid values are: + * --------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Value | Description + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 0 | unrealized; the application has not made a request to start presenting a channel or has stopped presenting a channel and released any resources. The + * | content of the video/broadcast object should be transparent but if not shall be an opaque black rectangle. Control of media presentation is under the * | control of the OITF, as defined in section H.2. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 1 | connecting; the terminal is connecting to the media source in order to begin playback. Objects in this state may be buffering data in order to start + * | playback. Control of media the control of the OITF, as defined in section H.2. The content of the video/broadcast object is implementation dependent. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 2 | presenting; the media is currently being presented to the user. The object is in this state regardless of whether the media is playing at normal speed, + * | paused, or playing in a trick mode (e.g. at a speed other than normal speed). Control of media presentation is under the control of the application, + * | as defined in section H.2. The video/broadcast object contains the video being presented. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 3 | stopped; the terminal is not presenting media, either inside the video/broadcast object or in the logical video plane. The logical video plane is + * | disabled. The content of the video/broadcast object SHALL be an opaque black rectangle. Control of media presentation is under the control of the + * | application, as defined in section H.2 + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * See section 7.13.1.1 for a description of the state model for a video/broadcast object. + * NOTE: Implementations where the content of the video/broadcast object is transparent in the unrealized state will give a better user experience than + * ones where it is black. This happens for an application with video in the background between when it includes a video/broadcast object in the page and when a + * call to bindToCurrentChannel() completes. Applications which do not need to call bindToCurrentChannel() should not do so. The current channel can + * be obtained from the currentChannel property on the ApplicationPrivateData object which is the same as that on the video/broadcast object under most normal * conditions. + */ playstate: 0, - //Read only Stringcollection + /* + * Description: + * The list of media formats that are supported by the object. Each item SHALL contain a format label according + * to [OIPF_MEDIA2]. + * If scarce resources are not claimed by the object, the value of this property SHALL be null. + * + * Visibilité Type: readonly StringCollection + */ playerCapabilities: null, - // Read only Integer + /* + * Description: + * Returns the resource allocation method currently in use by the object. Valid values as defined in section 7.14.13.1 are: + * to [OIPF_MEDIA2]. + * • STATIC_ALLOCATION + * • DYNAMIC_ALLOCATION + * + * Visibilité Type: readonly Integer + */ allocationMethod: null, + createdCallback: function() { + + + }, + init: function() { console.log("[INFO] constructor of VideoBroadcast class called."); var proto = VideoBroadcastObject.prototype; proto.createdCallback = function(){ - console.log("[INFO] createdCallback called."); - //this.width= "128"; - //this.height= "128"; - //this.align = "middle"; - - //this.data = "../view/img/video-broadcast.jpg"; + } document.registerElement('video-broadcast', { @@ -59,142 +132,280 @@ }, /*! + * Description: + * The function that is called when a request to switch a tuner to another channel resulted in an error preventing + * the broadcasted content from being rendered. The specified function is called with the arguments channel + * and errorState . This function may be called either in response to a channel change initiated by the + * application, or a channel change initiated by the OITF (see section 7.13.1.1). * - *\param Channel channel - *\param Number errorState + * These arguments are defined as follows: * - */ + * • Channel channel: + * the Channel object to which a channel switch was requested, but for which the + * error occurred. This object SHALL have the same properties as the channel that was requested, + * except that for channels of type ID_DVB_* the values for the onid and tsid properties SHALL be + * extracted from the transport stream when one was found (e.g. when errorState is 12). + * + * • Number errorState: error code detailing the type of error: + * --------------------------------------------------------------------------------------------------------------------------------------------------------------- + * Value | Description + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 0 | channel not supported by tuner. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 1 | cannot tune to given transport stream (e.g. no signal) + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 2 | tuner locked by other object. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 3 | parental lock on channel. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 4 | encrypted channel, key/module missing. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 5 | unknown channel (e.g. can’t resolve DVB or ISDB triplet). + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 6 | channel switch interrupted (e.g. because another channel switch was activated before the previous one completed). + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 7 | channel cannot be changed, because it is currently being recorded. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 8 | cannot resolve URI of referenced IP channel. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 9 | insufficient bandwidth. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 10 | channel cannot be changed by nextChannel()/prevChannel() methods either because the OITF does not maintain a favourites or channel list or because the + * | video/broadcast object is in the Unrealized state. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 11 | insufficient resources are available to present the given channel (e.g. a lack of available codec resources). + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 12 | specified channel not found in transport stream. + * ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- + * 100 | unidentified error. + * --------------------------------------------------------------------------------------------------------------------------------------------------------------- + */ onChannelChangeError: function(channel, errorState) { }, /*! + * Description: + * The function that is called when the play state of the video/broadcast object changes. This function may + * be called either in response to an action initiated by the application, an action initiated by the OITF or an + * error (see section 7.13.1.1). + * + * The specified function is called with the arguments state and error . These arguments are defined as follows: + * + * • Number state: + * the new state of the video/broadcast object. Valid values are given in the definition of the playState property above. * - *\param Number channel - *\param Number errorState - * - */ + * • Number error – if the state has changed due to an error, this field contains an error code detailing the type of error. See the definition of * onChannelChangeError above for valid values. If no error has occurred, this argument SHALL take the value undefined . + */ onPlayStateChange: function(state, error) { }, - /* + /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Channel channel - * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ onChannelChangeSucceeded: function(channel) { }, + /* + * Description: + * The function that is called when the value of fullScreen changes. + */ onFullScreenChange: function() { }, + /* + * Description: + * The function that is called when the video object gains focus. + */ onfocus: function() { }, + /* + * Description: + * The function that is called when the video object loses focus. + */ onblur: function() { }, /* * - *\retunr ChannelConfig retrieve configuration information on list * channels avialable - * + * Description: + * Returns the channel line-up of the tuner in the form of a ChannelConfig object as defined + * in section 7.13.9. The method SHALL return the value null if the channel list is not + * (partially) managed by the OITF (i.e., if the channel list information is managed entirely in the network). */ getChannelConfig: function() { }, - //Channel + /* + * Description: + * If the video/broadcast object is in the unrealized state and video from exactly one + * channel is currently being presented by the OITF then this binds the video/broadcast + * object to that video. + * If the video/broadcast object is in the stopped state then this restarts presentation of + * video and audio from the current channel under the control of the video/broadcast object. + * If video from more than one channel is currently being presented by the OITF then this binds + * the video/broadcast object to the channel whose audio is being presented. + * If there is no channel currently being presented, or binding to the necessary resources to + * play the channel through the video/broadcast object fails for whichever reason, the OITF + * SHALL dispatch an event to the onPlayStateChange listener(s) whereby the state + * parameter is given value 0 (“ unrealized ”) and the error parameter is given the + * appropriate error code. + * Calling this method from any other states than the unrealized or stopped states SHALL have + * no effect. + * See section 7.13.1.1 for more information of its usage. + * + * NOTE: Returning a Channel object from this method does not guarantee that video or audio + * 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. + */ bindToCurrentChannel: function() { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Integer - *\param String - *\param Integer - * - *\return Channel + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ createChannelObject: function(idType, dsd, sid) { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Integer - *\param Integer - *\param Integer - *\param Integer - *\param Integer - *\param String - * - *\return Channel + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ createChannelObject: function(idType, onid, tsid, sid, sourceID, ipBroadcastID) { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Channel - *\param Boolean - *\param String - * - * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ - setChannel: function(channel, trickplay, - contentAccessDescriptorURL) { + setChannel: function(channel, trickplay, contentAccessDescriptorURL) { }, + /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: + * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). + */ prevChannel: function() { }, + /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: + * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). + */ nextChannel: function() { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Boolean - * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ setFullScreen: function(fullscreen) { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *\param Integer Between 0 and 100 - *\return Boolean + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ setVolume: function(volume) { }, /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: * - *return Integer + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). */ getVolume: function() { }, + /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: + * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). + */ release: function() { }, + /* + * Description: + * The function that is called when a request to switch a tuner to another channel has successfully completed. + * This function may be called either in response to a channel change initiated by the application, or a channel + * change initiated by the OITF (see section 7.13.1.1). The specified function is called with argument channel, + * which is defined as follows: + * + * • Channel channel – the channel to which the tuner switched. This object SHALL have the same properties with the same values as the currentChannel object (see * section 7.13.7). + */ stop: function() { Deleted: oipf/view/img/video-broadcast.jpg =================================================================== (Binary files differ)