ImaServerSideAdInsertionMediaSource.AdsLoader


public final 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 methods

void

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

ImaServerSideAdInsertionMediaSource.AdsLoader.State

Releases resources.

void

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

void
setPlayer(Player player)

Sets the player.

Public methods

focusSkipButton

@UnstableApi
public void focusSkipButton()

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

See also
focus

release

public ImaServerSideAdInsertionMediaSource.AdsLoader.State release()

Releases resources.

Returns
ImaServerSideAdInsertionMediaSource.AdsLoader.State

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

replaceAdTagParameters

@UnstableApi
public void replaceAdTagParameters(Map<StringString> adTagParameters)

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

setPlayer

public void setPlayer(Player player)

Sets the player.

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