Methods
Support in HbbTV
Available since: HbbTV 1.0 (ETSI TS 102 796 V1.1.1, OIPF DAE V1.1)
Methods for creating objects not required by the present document are not included.
The requiredCapabilities argument on the createVideoBroadcastObject() and createVideoMpegObject() methods shall not be used and can be ignored.
Creation of embedded objects (both visual and non-visual) by using the <object> element in an HTML document or by using the DOM createElement() method and adding the resulting element to the application’s DOM tree shall be supported.
The createMediaSynchroniser() and createCSManager() methods defined in clause A.2.7 shall be supported.
The extensions to isObjectSupported() defined in clause A.2.7 shall be supported.
Comment
The oipfObjectFactory object as defined in clause 7.1 of the OIPF DAE specification [1] shall be extended by the methods defined in this clause.
MediaSynchroniser createMediaSynchroniser () | |
Description | Creates a new MediaSynchroniser embedded object. |
Object createCSManager () | |
Description | Creates a new HbbTVCSManager embedded object. |
The isObjectSupported() method shall be extended to support the following MIME types for querying support of new functionality defined in the present document:
- application/hbbtvMediaSynchroniser
- application/hbbtvCSManager
Boolean isObjectSupported( String mimeType ) | ||||||||||||||||||||||
Description | This method SHALL return true if and only if an object of the specified type is supported by the OITF, otherwise it SHALL return false. | |||||||||||||||||||||
Arguments | mimeType | If the value of the argument is one of the MIME types defined in tables 1 to 4 of [OIPF_MEDIA2] or one of the DAE defined mime types listed below then an accurate indication of the OITF’s support for that MIME type SHALL be returned. For other values, it is recommended that an OITF returns a value which accurately reflects its support for the specified MIME type.
|
Visual objects
The methods in this section all return HTMLObjectElement objects which can be inserted in to the DOM tree. All objects in section 7 which have a visual representation on the screen can be created using methods in this section. Only for objects defined in section 7, that are supported by the device (i.e. as indicated through the client capability description), a corresponding method name to instantiate the object through the OipfObjectFactory class can be assumed to be present on the oipfObjectFactory object. For any other object, a corresponding method name cannot be assumed to be present.
HTMLObjectElement createVideoBroadcastObject( HTMLObjectElement createVideoMpegObject( StringCollection requiredCapabilities ) HTMLObjectElement createStatusViewObject() | ||
Description | If the object type is supported, each of these methods 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. |
Non-Visual objects
The methods in this section all return JavaScript objects which implement the interfaces of their corresponding objects. They can not be inserted in the DOM tree. All objects in section 7 which do not have a visual representation on the screen can be created using methods in this section. Only for objects defined in section 7, that are supported by the device (i.e. as indicated through the client capability description), a corresponding method name to instantiate the object through the OipfObjectFactory class can be assumed to be present on the oipfObjectFactory object. For any other object, a corresponding method name cannot be assumed to be present.
Object createApplicationManagerObject() Object createCapabilitiesObject() ChannelConfig createChannelConfig() Object createCodManagerObject() Object createConfigurationObject() Object createDownloadManagerObject() Object createDownloadTriggerObject() Object createDrmAgentObject() Object createGatewayInfoObject() Object createIMSObject() Object createMDTFObject() Object createNotifSocketObject() Object createParentalControlManagerObject() Object createRecordingSchedulerObject() Object createRemoteControlFunctionObject() Object createRemoteManagementObject() Object createSearchManagerObject() | |
Description | If the object type is supported, each of these methods SHALL return an instance of the corresponding embedded object. This may be a new instance or existing instance. For example, the object will likely be a global singleton object and calls to this method may return the same instance. 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 name property set to the value “TypeError”. If the object is supported, the method SHALL return a JavaScript Object which implements the interface for the specified object. |