diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java index 40d0645e2f..968d4a728f 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java @@ -26,16 +26,10 @@ import com.google.android.exoplayer2.audio.AudioSink; import com.google.android.exoplayer2.audio.DefaultAudioSink; import com.google.android.exoplayer2.audio.MediaCodecAudioRenderer; import com.google.android.exoplayer2.metadata.MetadataRenderer; -import com.google.android.exoplayer2.source.ClippingMediaSource; -import com.google.android.exoplayer2.source.ConcatenatingMediaSource; import com.google.android.exoplayer2.source.DefaultMediaSourceFactory; -import com.google.android.exoplayer2.source.LoopingMediaSource; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.source.MediaSourceFactory; -import com.google.android.exoplayer2.source.MergingMediaSource; -import com.google.android.exoplayer2.source.ProgressiveMediaSource; import com.google.android.exoplayer2.source.ShuffleOrder; -import com.google.android.exoplayer2.source.SingleSampleMediaSource; import com.google.android.exoplayer2.text.TextRenderer; import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelector; @@ -61,15 +55,13 @@ import java.util.List; * Components common to all ExoPlayer implementations are: * *
Note: To loop a {@link MediaSource} indefinitely, it is usually better to use {@link
- * ExoPlayer#setRepeatMode(int)} instead of this class.
+ * @deprecated To loop a {@link MediaSource} indefinitely, use {@link Player#setRepeatMode(int)}
+ * instead of this class. To add a {@link MediaSource} a specific number of times to the
+ * playlist, use {@link ExoPlayer#addMediaSource} in a loop with the same {@link MediaSource}.
+ * To combine repeated {@link MediaSource} instances into one {@link MediaSource}, for example
+ * to further wrap it in another {@link MediaSource}, use {@link ConcatenatingMediaSource} with
+ * the same {@link MediaSource} {@link ConcatenatingMediaSource#addMediaSource added} multiple
+ * times.
*/
+@Deprecated
public final class LoopingMediaSource extends CompositeMediaSource