mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Use withLivePostrollPlaeholderAppended to add placeholder
PiperOrigin-RevId: 525177113
This commit is contained in:
parent
07ff3eeead
commit
85fb32d70f
1 changed files with 3 additions and 5 deletions
|
|
@ -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…
Reference in a new issue