mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
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:
parent
ea21af2ce9
commit
32b5a80291
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user