Use withLivePostrollPlaeholderAppended to add placeholder
PiperOrigin-RevId: 525177113
This commit is contained in:
parent
07ff3eeead
commit
85fb32d70f
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user