mirror of
https://github.com/samsonjs/media.git
synced 2026-04-24 14:37:45 +00:00
Forward getStreamKeys in ClippingMediaPeriod
Not doing this prevents downloads of clipped media. PiperOrigin-RevId: 597541395
This commit is contained in:
parent
085bc6c416
commit
cd2d7f5da5
1 changed files with 7 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.media3.common.C;
|
import androidx.media3.common.C;
|
||||||
import androidx.media3.common.Format;
|
import androidx.media3.common.Format;
|
||||||
import androidx.media3.common.MimeTypes;
|
import androidx.media3.common.MimeTypes;
|
||||||
|
import androidx.media3.common.StreamKey;
|
||||||
import androidx.media3.common.util.Assertions;
|
import androidx.media3.common.util.Assertions;
|
||||||
import androidx.media3.common.util.NullableType;
|
import androidx.media3.common.util.NullableType;
|
||||||
import androidx.media3.common.util.UnstableApi;
|
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.source.ClippingMediaSource.IllegalClippingException;
|
||||||
import androidx.media3.exoplayer.trackselection.ExoTrackSelection;
|
import androidx.media3.exoplayer.trackselection.ExoTrackSelection;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wraps a {@link MediaPeriod} and clips its {@link SampleStream}s to provide a subsequence of their
|
* 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();
|
mediaPeriod.maybeThrowPrepareError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StreamKey> getStreamKeys(List<ExoTrackSelection> trackSelections) {
|
||||||
|
return mediaPeriod.getStreamKeys(trackSelections);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TrackGroupArray getTrackGroups() {
|
public TrackGroupArray getTrackGroups() {
|
||||||
return mediaPeriod.getTrackGroups();
|
return mediaPeriod.getTrackGroups();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue