Author: ygrego Date: 2015-02-02 09:56:32 +0000 (Mon, 02 Feb 2015) New Revision: 754 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/754 Log: Adding style for html element 'object' and comments for 'VideoBroadcastObjet'. Deleting 'Class definition' into 'CapabilitiesObject'. Modified: oipf/js/impl/CapabilitiesObject.js oipf/js/impl/VideoBroadcastObject.js oipf/view/welcome.html Modified: oipf/js/impl/CapabilitiesObject.js =================================================================== --- oipf/js/impl/CapabilitiesObject.js 2015-02-02 08:43:25 UTC (rev 753) +++ oipf/js/impl/CapabilitiesObject.js 2015-02-02 09:56:32 UTC (rev 754) @@ -1,19 +1,3 @@ -var Class = new Function(); - -Function.prototype.extend = function(proto) { - var parent = this; - - var child = function() { - this.init && this.init.apply(this, arguments); - }; - - child.prototype = proto; - child.prototype.__proto__ = parent.prototype; - child.prototype.super = parent.prototype; - - return child; -}; - var CapabilitiesObject = Class.extend({ init : function(){ Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-02 08:43:25 UTC (rev 753) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-02 09:56:32 UTC (rev 754) @@ -1,3 +1,30 @@ +/*! + * Description: + * If the object type is supported, this method shall return an instance of the + * corresponding embedded object. + * Since objects do not claim scarce resources when they are instantiated, instantiation shall + * never fail if the object type is supported. If the method name to create the object is not + * supported, the OITF SHALL throw an error with the error.name set to the value + * " TypeError ". + * If the object type is supported, the method shall return an HTMLObjectElement equivalent + * to the specified object. The value of the type attribute of the HTMLObjectElement SHALL + * match the mimetype of the instantiated object, for example " video/broadcast " in case of + * method oipfObjectFactory.createVideoBroadcastObject() . + * + * Arguments: + * -requiredCapabilities : + * An optional argument indicating the formats to be supported by + * the resulting player. Each item in the argument SHALL be one of + * the formats specified in [OIPF_MEDIA2]. Scarce resources will + * be claimed by the object at the time of instantiation. The + * allocationMethod property SHALL be set + * STATIC_ALLOCATION . If the OITF is unable to create the player + * object with the requested capabilities, the method SHALL return + * null . + * If this argument is omitted, objects do not claim scarce resources + * so instantiation shall never fail if the object type is supported. The + * allocationMethod property SHALL be set to DYNAMIC_ALLOCATION . + */ var VideoBroadcastObject = Class.extend({ width: null, @@ -17,11 +44,11 @@ var proto = VideoBroadcastObject.prototype; proto.createdCallback = function(){ - console.log("OK"); + console.log("[INFO] createdCallback called."); //this.width= "128"; //this.height= "128"; - this.align = "middle"; - this.style = "background-image:url(\"../view/img/video-broadcast.jpg\")"; + //this.align = "middle"; + //this.data = "../view/img/video-broadcast.jpg"; } Modified: oipf/view/welcome.html =================================================================== --- oipf/view/welcome.html 2015-02-02 08:43:25 UTC (rev 753) +++ oipf/view/welcome.html 2015-02-02 09:56:32 UTC (rev 754) @@ -8,9 +8,19 @@ background-size: cover; background-position: center; } + #center { + + margin-left: auto; + margin-right: auto; + width: 20%; + vertical-align: middle; + } + #video-broadcast { + background-image: url("img/video-broadcast.jpg"); + background-size: cover; + background-repeat: no-repeat; + } </style> - - <script src="../js/lib/VisualClass.js" type="text/javascript"></script> <script src="../js/lib/Class.js" type="text/javascript"></script> <script src="../data/data.js" type="text/javascript"></script> <script src="../js/impl/OipfObjectFactory.js" type="text/javascript"></script> @@ -42,9 +52,11 @@ </script> </head> <body> + <div id="center"> + <object id="video-broadcast" is="video-broadcast"></object> + </div> + - <object is="video-broadcast"></object> - </body> </html> \ No newline at end of file