ImaServerSideAdInsertionMediaSource.AdsLoader


class ImaServerSideAdInsertionMediaSource.AdsLoader


An ads loader for IMA server side ad insertion streams.

Summary

Nested types

Builder for building an AdsLoader.

The state of the AdsLoader that can be used when resuming from the background.

Public functions

Unit

Puts the focus on the skip button, if a skip button is present and an ad is playing.

ImaServerSideAdInsertionMediaSource.AdsLoader.State!

Releases resources.

Unit

Replaces all the ad tag parameters used for the upcoming ad requests for a live stream.

Unit
setPlayer(player: Player!)

Sets the player.

Public functions

focusSkipButton

@UnstableApi
fun focusSkipButton(): Unit

Puts the focus on the skip button, if a skip button is present and an ad is playing.

See also
focus

release

fun release(): ImaServerSideAdInsertionMediaSource.AdsLoader.State!

Releases resources.

Returns
ImaServerSideAdInsertionMediaSource.AdsLoader.State!

The State that can be used when resuming from the background.

replaceAdTagParameters

@UnstableApi
fun replaceAdTagParameters(adTagParameters: (Mutable)Map<String!, String!>!): Unit

Replaces all the ad tag parameters used for the upcoming ad requests for a live stream.

setPlayer

fun setPlayer(player: Player!): Unit

Sets the player.

This method needs to be called before adding server side ad insertion media items to the player.