2017-08-29 02:38:37 +02:00
|
|
|
package org.schabi.newpipe.player;
|
|
|
|
|
|
|
|
import com.google.android.exoplayer2.source.DynamicConcatenatingMediaSource;
|
|
|
|
import com.google.android.exoplayer2.source.MediaSource;
|
|
|
|
|
2017-08-29 17:00:11 +02:00
|
|
|
import org.schabi.newpipe.playlist.PlayQueue;
|
2017-08-29 02:38:37 +02:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2017-08-29 17:00:11 +02:00
|
|
|
public class PlaybackManager {
|
2017-08-29 02:38:37 +02:00
|
|
|
|
|
|
|
private DynamicConcatenatingMediaSource source;
|
|
|
|
|
2017-08-29 17:00:11 +02:00
|
|
|
private PlayQueue playQueue;
|
|
|
|
private int index;
|
|
|
|
|
2017-08-29 02:38:37 +02:00
|
|
|
private List<MediaSource> sources;
|
|
|
|
|
2017-08-29 17:00:11 +02:00
|
|
|
public PlaybackManager(PlayQueue playQueue, int index) {
|
2017-08-29 02:38:37 +02:00
|
|
|
this.source = new DynamicConcatenatingMediaSource();
|
2017-08-29 17:00:11 +02:00
|
|
|
|
|
|
|
this.playQueue = playQueue;
|
|
|
|
this.index = index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface OnChangeListener {
|
|
|
|
void isLoading();
|
|
|
|
void isLoaded();
|
2017-08-29 02:38:37 +02:00
|
|
|
}
|
|
|
|
}
|