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 ...@@ -743,11 +743,9 @@ public final class ImaServerSideAdInsertionMediaSource extends CompositeMediaSou
contentMediaSourceFactory.createMediaSource(contentMediaItem), componentListener); contentMediaSourceFactory.createMediaSource(contentMediaItem), componentListener);
this.serverSideAdInsertionMediaSource = serverSideAdInsertionMediaSource; this.serverSideAdInsertionMediaSource = serverSideAdInsertionMediaSource;
if (isLiveStream) { if (isLiveStream) {
AdPlaybackState liveAdPlaybackState = mainHandler.post(
new AdPlaybackState(adsId) () ->
.withNewAdGroup(/* adGroupIndex= */ 0, /* adGroupTimeUs= */ C.TIME_END_OF_SOURCE) setAdPlaybackState(new AdPlaybackState(adsId).withLivePostrollPlaceholderAppended()));
.withIsServerSideInserted(/* adGroupIndex= */ 0, true);
mainHandler.post(() -> setAdPlaybackState(liveAdPlaybackState));
} }
prepareChildSource(/* id= */ null, serverSideAdInsertionMediaSource); 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