Back to Exoplayer

ServerSideAdInsertionMediaSource.AdPlaybackStateUpdater (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionMediaSource.AdPlaybackStateUpdater.html

latest1.8 KB
Original Source

Package com.google.android.exoplayer2.source.ads

Interface ServerSideAdInsertionMediaSource.AdPlaybackStateUpdater


public static interfaceServerSideAdInsertionMediaSource.AdPlaybackStateUpdater

Receives ad playback state update requests when the Timeline of the content media source has changed.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | onAdPlaybackStateUpdateRequested​(Timeline contentTimeline) | Called when the content source has refreshed the timeline. |

Method Detail

- 

onAdPlaybackStateUpdateRequested

boolean onAdPlaybackStateUpdateRequested​([Timeline](../../Timeline.html "class in com.google.android.exoplayer2")contentTimeline)

Called when the content source has refreshed the timeline.

If true is returned the source refresh publication is deferred, to wait for an ServerSideAdInsertionMediaSource.setAdPlaybackStates(ImmutableMap, Timeline) ad playback state update}. If false is returned, the source refresh is immediately published.

Called on the playback thread.

Parameters:contentTimeline - The Timeline of the wrapped content media source.Returns:true to defer the source refresh publication, or false to immediately publish the source refresh.