Forward getStreamKeys in ClippingMediaPeriod

Not doing this prevents downloads of clipped media.

PiperOrigin-RevId: 597541395
This commit is contained in:
tonihei 2024-01-11 06:45:48 -08:00 committed by Copybara-Service
parent 085bc6c416
commit cd2d7f5da5

View file

@ -19,6 +19,7 @@ import androidx.annotation.Nullable;
import androidx.media3.common.C;
import androidx.media3.common.Format;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.StreamKey;
import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.NullableType;
import androidx.media3.common.util.UnstableApi;
@ -30,6 +31,7 @@ import androidx.media3.exoplayer.SeekParameters;
import androidx.media3.exoplayer.source.ClippingMediaSource.IllegalClippingException;
import androidx.media3.exoplayer.trackselection.ExoTrackSelection;
import java.io.IOException;
import java.util.List;
/**
* Wraps a {@link MediaPeriod} and clips its {@link SampleStream}s to provide a subsequence of their
@ -107,6 +109,11 @@ public final class ClippingMediaPeriod implements MediaPeriod, MediaPeriod.Callb
mediaPeriod.maybeThrowPrepareError();
}
@Override
public List<StreamKey> getStreamKeys(List<ExoTrackSelection> trackSelections) {
return mediaPeriod.getStreamKeys(trackSelections);
}
@Override
public TrackGroupArray getTrackGroups() {
return mediaPeriod.getTrackGroups();