Clarify/correct restrictions of AdsMediaSource.

The source can be used in compositions (in fact, every source is
automatically used in an internal composition when constructing the
playlist), and there is not really a concept of top-level media source
any more since the Player supports playlists.

The actual restriction is that the content media source needs to have
exactly one period to be able to create a SinglePeriodAdTimeline.

#minor-release

PiperOrigin-RevId: 357544191
This commit is contained in:
tonihei 2021-02-15 11:32:46 +00:00 committed by marcbaechinger
parent 84d7433936
commit 0ab9a219f7

View File

@ -51,9 +51,9 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/**
* A {@link MediaSource} that inserts ads linearly with a provided content media source. This source
* cannot be used as a child source in a composition. It must be the top-level source used to
* prepare the player.
* A {@link MediaSource} that inserts ads linearly into a provided content media source.
*
* <p>The wrapped content media source must contain a single {@link Timeline.Period}.
*/
public final class AdsMediaSource extends CompositeMediaSource<MediaPeriodId> {