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
This commit is contained in:
olly 2017-06-02 07:39:33 -07:00 committed by Oliver Woodman
parent ea21af2ce9
commit 32b5a80291

View File

@ -23,19 +23,21 @@ import com.google.android.exoplayer2.util.Assertions;
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 {
private static final String TAG = "LoopingMediaSource";
private final MediaSource childSource;
private final int loopCount;
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.
*/