Class SinglePeriodAdTimeline

  • All Implemented Interfaces:

    public final class SinglePeriodAdTimeline
    extends ForwardingTimeline
    Deprecated. 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.
    A Timeline for sources that have ads.
    • Constructor Detail

      • SinglePeriodAdTimeline

        public SinglePeriodAdTimeline​(Timeline contentTimeline,
                                      AdPlaybackState adPlaybackState)
        Creates a new timeline with a single period containing ads.
        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.