Commit 85fb32d7 by bachinger Committed by Rohit Singh

Use withLivePostrollPlaeholderAppended to add placeholder

PiperOrigin-RevId: 525177113
parent 07ff3eee
......@@ -743,11 +743,9 @@ public final class ImaServerSideAdInsertionMediaSource extends CompositeMediaSou
contentMediaSourceFactory.createMediaSource(contentMediaItem), componentListener);
this.serverSideAdInsertionMediaSource = serverSideAdInsertionMediaSource;
if (isLiveStream) {
AdPlaybackState liveAdPlaybackState =
new AdPlaybackState(adsId)
.withNewAdGroup(/* adGroupIndex= */ 0, /* adGroupTimeUs= */ C.TIME_END_OF_SOURCE)
.withIsServerSideInserted(/* adGroupIndex= */ 0, true);
mainHandler.post(() -> setAdPlaybackState(liveAdPlaybackState));
mainHandler.post(
() ->
setAdPlaybackState(new AdPlaybackState(adsId).withLivePostrollPlaceholderAppended()));
}
prepareChildSource(/* id= */ null, serverSideAdInsertionMediaSource);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment