Commit 32b5a802 by olly Committed by Oliver Woodman

Deprecate LoopingMediaSource for indefinite looping

ExoPlayer.setRepeatMode should be preferred. Deprecate
the constructor and update the relevant documentation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157829207
parent ea21af2c
...@@ -23,19 +23,21 @@ import com.google.android.exoplayer2.util.Assertions; ...@@ -23,19 +23,21 @@ import com.google.android.exoplayer2.util.Assertions;
import java.io.IOException; import java.io.IOException;
/** /**
* Loops a {@link MediaSource}. * Loops a {@link MediaSource} a specified number of times.
* <p>
* Note: To loop a {@link MediaSource} indefinitely, it is usually better to use
* {@link ExoPlayer#setRepeatMode(int)}.
*/ */
public final class LoopingMediaSource implements MediaSource { public final class LoopingMediaSource implements MediaSource {
private static final String TAG = "LoopingMediaSource";
private final MediaSource childSource; private final MediaSource childSource;
private final int loopCount; private final int loopCount;
private int childPeriodCount; private int childPeriodCount;
/** /**
* Loops the provided source indefinitely. * Loops the provided source indefinitely. Note that it is usually better to use
* {@link ExoPlayer#setRepeatMode(int)}.
* *
* @param childSource The {@link MediaSource} to loop. * @param childSource The {@link MediaSource} to loop.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment