Asset

data class Asset(val id: String, val type: String? = null, val uri: String? = null, val uris: List<AssetUri>? = null, val mediaType: String? = null, val duration: Double? = null, val vendor: String? = null, val vendorParameters: Map<String, Any?>? = null, val assetParameters: Map<String, String>? = null, val companion: Asset? = null, val interaction: Interaction? = null)

A single ad asset. Only the fields the SDK orchestrator/sequencer need are modeled here (the id drives the ad-event sequence); rich asset detail (uri/mediaType/companion/vendor params) is added in the player phase.

Constructors

Link copied to clipboard
constructor(id: String, type: String? = null, uri: String? = null, uris: List<AssetUri>? = null, mediaType: String? = null, duration: Double? = null, vendor: String? = null, vendorParameters: Map<String, Any?>? = null, assetParameters: Map<String, String>? = null, companion: Asset? = null, interaction: Interaction? = null)

Properties

Link copied to clipboard

Per-asset ad parameters authored in the break manifest (the GAM adTagParameters for this asset). The lowest-precedence layer of the asset-parameter merge — SessionConfig.assetParameters and updateAssetParameters() override it per key.

Link copied to clipboard

Companion creative shown alongside this asset — the second box of a double break, and the backdrop of an lshape_ad. Mirrors the web AssetWithCompanion.companion.

Link copied to clipboard

The maximum on-screen duration of the asset in seconds (mirrors the TS BaseAsset.duration). Used by the renderer to time non-self-terminating assets such as overlay images; falls back to the break duration when null.

Link copied to clipboard
val id: String

Unique id of the asset within the manifest; carried on every ad event for this asset.

Link copied to clipboard

Interaction options (click-through URL), when declared by the manifest.

Link copied to clipboard

Media MIME/type hint (e.g. HLS). Optional; the renderer infers from the URI when absent.

Link copied to clipboard
val type: String?

The asset type as written in the manifest: static, vendor or vast.

Link copied to clipboard
val uri: String?

For static assets: the direct media URL. For vendor (e.g. GAM pod) assets: the pod/ad-break identifier used to build the pod-manifest URL.

Link copied to clipboard

Targeted URI candidates, when the manifest supplies an array instead of a plain string. Mutually exclusive with uri. Resolve via Asset.resolveUri.

Link copied to clipboard

Ad vendor for vendor assets (e.g. "gam"). Null for static assets.

Link copied to clipboard

Raw vendor parameters (decoded JSON map); parsed by the vendor integration (for GAM, into GamVendorParameters).

Functions

Link copied to clipboard
fun Asset.resolveUri(deviceType: DeviceType?): String?

Resolve this asset's URI for deviceType, handling both the single-string and the targeted-array manifest shapes. Prefer this over reading Asset.uri directly.