public final class

ImaServerSideAdInsertionMediaSource.AdsLoader

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.ima.ImaServerSideAdInsertionMediaSource.AdsLoader

Overview

An ads loader for IMA server side ad insertion streams.

Summary

Methods
public voidfocusSkipButton()

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

public ImaServerSideAdInsertionMediaSource.AdsLoader.Staterelease()

Releases resources.

public voidreplaceAdTagParameters(java.util.Map<java.lang.String, java.lang.String> adTagParameters)

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

public voidsetPlayer(Player player)

Sets the player.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

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.

public void replaceAdTagParameters(java.util.Map<java.lang.String, java.lang.String> adTagParameters)

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

See also:

public void focusSkipButton()

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

See also:

Releases resources.

Returns:

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