Back to Exoplayer

ImaServerSideAdInsertionMediaSource.AdsLoader (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.html

latest3.0 KB
Original Source

Package com.google.android.exoplayer2.ext.ima

Class ImaServerSideAdInsertionMediaSource.AdsLoader


public static final classImaServerSideAdInsertionMediaSource.AdsLoaderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

An ads loader for IMA server side ad insertion streams.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | ImaServerSideAdInsertionMediaSource.AdsLoader.Builder | Builder for building an ImaServerSideAdInsertionMediaSource.AdsLoader. | | static class | ImaServerSideAdInsertionMediaSource.AdsLoader.State | The state of the ImaServerSideAdInsertionMediaSource.AdsLoader that can be used when resuming from the background. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | focusSkipButton() | Puts the focus on the skip button, if a skip button is present and an ad is playing. | | ImaServerSideAdInsertionMediaSource.AdsLoader.State | release() | Releases resources. | | void | setPlayer​(Player player) | Sets the player. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

- 

setPlayer

public void setPlayer​([Player](../../Player.html "interface in com.google.android.exoplayer2")player)

Sets the player.

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

- 

focusSkipButton

public void focusSkipButton()

Puts the focus on the skip button, if a skip button is present and an ad is playing. See Also:BaseManager.focus()

- 

release

public[ImaServerSideAdInsertionMediaSource.AdsLoader.State](ImaServerSideAdInsertionMediaSource.AdsLoader.State.html "class in com.google.android.exoplayer2.ext.ima")release()

Releases resources. Returns:The ImaServerSideAdInsertionMediaSource.AdsLoader.State that can be used when resuming from the background.