initWithGam

fun initWithGam(adUnit: (StorytellerAdRequestInfo.ClipsAdRequestInfo) -> String, descriptionUrl: (StorytellerAdRequestInfo.ClipsAdRequestInfo) -> String, contentUrl: (StorytellerAdRequestInfo.ClipsAdRequestInfo) -> String? = { null }, customParams: (StorytellerAdRequestInfo.ClipsAdRequestInfo) -> Map<String, String> = { emptyMap() }, tagParameters: (StorytellerAdRequestInfo.ClipsAdRequestInfo) -> Map<String, String> = { emptyMap() }, vastLoadTimeoutMs: Int? = null, mediaLoadTimeoutMs: Int? = null)

Configures IMA using callbacks from which Storyteller builds a Google Ad Manager video tag.

Host tagParameters are merged last and may deliberately override generated top-level values. Complete tags and callback values are never logged by this module.

Parameters

adUnit

GAM ad-unit path serialized as iu.

descriptionUrl

HTTPS page or content description URL.

contentUrl

Optional content URL serialized as url.

customParams

Optional custom targeting serialized as cust_params.

tagParameters

Optional top-level GAM tag parameters merged last.

vastLoadTimeoutMs

Optional positive IMA VAST-load timeout; null keeps IMA's default.

mediaLoadTimeoutMs

Optional positive IMA media timeout; null keeps IMA's default.