lib / tv.smartclip.smartclientandroid.lib / SxAdSlotController

SxAdSlotController

class SxAdSlotController : Releasable, IKoinDi

Wrapper for advertisement processing. After the loading process was initialized by one of the SxAdSlotController.loadAd methods all needed visualization changes are forwarded to the provided SxAdSlotDelegate.

Functions

loadAd

Request the initialization of the provided SxAdSlot from the smartcore.

suspend fun loadAd(adSlot: SAdSlot<*>): <ERROR CLASS>

Same as SxAdSlotController.loadAd but with Strings instead of Uris for the Url's.

suspend fun loadAd(adTag: String, autoPlay: Boolean = true, opener: String? = null, closer: String? = null, bumper: String? = null): <ERROR CLASS>

Same as SxAdSlotController.loadAd with autoPlay set to true.

suspend fun loadAd(adTag: String, opener: String? = null, closer: String? = null, bumper: String? = null): <ERROR CLASS>
suspend fun loadAd(adTag: Uri, opener: Uri? = null, closer: Uri? = null, bumper: Uri? = null): <ERROR CLASS>

Request the initialization of the provided ad tag and its optional opener, closer and bumper from the smartcore.

suspend fun loadAd(adTag: Uri, autoPlay: Boolean = true, opener: Uri? = null, closer: Uri? = null, bumper: Uri? = null): <ERROR CLASS>

release

Releases all system resources which are referenced by this instance. After calling this, this instance can not be used any further.

fun release(): Unit

startAd

Only use in the following cases:

fun startAd(): <ERROR CLASS>

Companion Object Functions

create

Creates a new SxAdSlotController instance for the instream use-case.

fun create(params: InstreamParams): SxAdSlotController

Creates a new SxAdSlotController instance for the outstream use-case.

fun create(params: OutstreamParams): SxAdSlotController