The CODAsset class

Support in HbbTV

Available since: Not implemented in HbbTV

The CODAsset represents a piece of CoD content that can be purchased and played.  A CODAsset object MAY refer to a bundle of content items that are purchased together but which can only be played individually.

Some fields of a CODAsset object MAY not be populated until an application requests them; in this case the data MAY be fetched asynchronously from a server.  Fields where the data has not been fetched from the server SHALL have a value of undefined.  Fields for which data is not available on the server SHALL have a value of null.

Note: The lookupMetadata() method has been removed from this class.

Properties

readonly Integer type
The type of the item, used to distinguish between the types of objects that may be contained in a folder in a CoD catalogue. This property SHALL always have the value 1 for CoD assets.
readonly String uri
The CRID of the asset. The value of this property is given by the programId attribute of the BCG ProgramInformation element that describes the asset.
readonly String name
The title of the asset that will be displayed to the user. The value of this property is given by the BCG Title element that is a child of the asset’s BasicDescription element.
readonly String description
A description of the asset, for display to an end user. The value of this property is given by the BCG Synopsis element that is a child of the asset’s BasicDescription element.
readonly StringCollection genres
A collection of genres that describe this asset. Genres are represented by the values of any Name elements that are children of Genre elements in the asset’s description.
readonly ParentalRatingCollection parentalRatings
The parental rating value of the asset. This information will be read from the ParentalGuidance element of an asset’s description, if present.
readonly Boolean blocked
Flag indicating whether the asset is blocked due to parental control settings (i.e. whether its parental rating value exceeds the current system threshold).
readonly Boolean locked
Flag indicating whether the current state of the parental control system prevents the asset from being viewed (e.g. a correct parental control PIN has not been entered to allow the item to be viewed).
readonly String thumbnailUri
The URI of an image associated with this asset. For assets whose BCG description contains a RelatedMaterial element indicating a relationship of Promotional Still Image, the value of this property is given by the MediaURI element that is a descendant of that element. For assets without an appropriate RelatedMaterial element, the value of this property SHALL be undefined.
readonly String price
The price of the asset, in a form that can be displayed to the user. The value of this property is the concatenation of the value of the Price element that is a child of a PurchaseItem element in the asset’s description and the value of the Price element’s currency attribute. For example, a Price element of <Price currency=”JPY”>500</Price> would give the value 500 JPY for this field. Implementations MAY replace the currency code with the appropriate currency symbol (e.g. ¥ ).
readonly Integer rentalPeriod
The period for which the asset can be rented, in hours. For assets descriptions containing a Purchase element with a PurchaseType of urn:tva:metadata:cs:PurchaseTypeCS:2004:playForPeriod, the value of this property is derived from the QuantityUnit and QuantityRange elements that are children of that Purchase element. If a Purchase element with the appropriate PurchaseType is not present, the value of this field SHALL be undefined.
readonly Integer playCount
The number of plays allowed for this asset when it is purchased. For assets descriptions containing a Purchase element with a PurchaseType of urn:tva:metadata:cs:PurchaseTypeCS:2004:playCounts, the value of this property is derived from the QuantityUnit and QuantityRange elements that are children of that Purchase element. If a Purchase element with the appropriate PurchaseType is not present, the value of this field SHALL be undefined.
readonly Integer duration
The duration of the asset, in seconds. The value of this property is given by the BCG Duration element that is a child of the asset’s BasicDescription element.
readonly String previewUri
The URI used to refer to a preview of the asset. For assets whose BCG description contains a RelatedMaterial element indicating a relationship of Trailer or Preview, the value of this property is given by the MediaURI element of the MediaLocator contained in that element. For assets without an appropriate RelatedMaterial element, the value of this property SHALL be undefined.
readonly BookmarkCollection bookmarks
A collection of the bookmarks set in a recording. If no bookmarks are set, the collection SHALL be empty.

Methods

Boolean isReady()

Description

Check whether sufficient information is available to make a purchase or play the asset. Due to the asynchronous nature of CoD catalogues, not all of the information required to play or purchase a CoD asset may have been received by the OITF at any given time. If all of the required information is available, this method SHALL return true. Otherwise, this method SHALL request the missing information and return false. When the information is available, the application SHALL be notified via a ContentAction event with the reason code 1.