Class SinglePeriodAdTimeline
- java.lang.Object
-
- com.google.android.exoplayer2.Timeline
-
- com.google.android.exoplayer2.source.ForwardingTimeline
-
- com.google.android.exoplayer2.source.ads.SinglePeriodAdTimeline
-
- All Implemented Interfaces:
Bundleable
@Deprecated public final class SinglePeriodAdTimeline extends ForwardingTimeline
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.ATimeline
for sources that have ads.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.Timeline
Timeline.Period, Timeline.RemotableTimeline, Timeline.Window
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
-
Fields inherited from class com.google.android.exoplayer2.source.ForwardingTimeline
timeline
-
-
Constructor Summary
Constructors Constructor Description SinglePeriodAdTimeline(Timeline contentTimeline, AdPlaybackState adPlaybackState)
Deprecated.Creates a new timeline with a single period containing ads.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Timeline.Period
getPeriod(int periodIndex, Timeline.Period period, boolean setIds)
Deprecated.Populates aTimeline.Period
with data for the period at the specified index.-
Methods inherited from class com.google.android.exoplayer2.source.ForwardingTimeline
getFirstWindowIndex, getIndexOfPeriod, getLastWindowIndex, getNextWindowIndex, getPeriodCount, getPreviousWindowIndex, getUidOfPeriod, getWindow, getWindowCount
-
Methods inherited from class com.google.android.exoplayer2.Timeline
equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
-
-
-
-
Constructor Detail
-
SinglePeriodAdTimeline
public SinglePeriodAdTimeline(Timeline contentTimeline, AdPlaybackState adPlaybackState)
Deprecated.Creates a new timeline with a single period containing ads.- Parameters:
contentTimeline
- The timeline of the content alongside which ads will be played. It must have one window and one period.adPlaybackState
- The state of the period's ads.
-
-
Method Detail
-
getPeriod
public Timeline.Period getPeriod(int periodIndex, Timeline.Period period, boolean setIds)
Deprecated.Description copied from class:Timeline
Populates aTimeline.Period
with data for the period at the specified index.- Overrides:
getPeriod
in classForwardingTimeline
- Parameters:
periodIndex
- The index of the period.period
- TheTimeline.Period
to populate. Must not be null.setIds
- WhetherTimeline.Period.id
andTimeline.Period.uid
should be populated. If false, the fields will be set to null. The caller should pass false for efficiency reasons unless the fields are required.- Returns:
- The populated
Timeline.Period
, for convenience.
-
-