mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-09-23 17:38:51 +00:00
-Hooking playback manager and play queue into main video player.
This commit is contained in:
committed by
John Zhen Mo
parent
701320b100
commit
b859823011
@@ -25,8 +25,14 @@ public abstract class PlayQueue {
|
||||
private BehaviorSubject<PlayQueueEvent> changeBroadcast;
|
||||
private Flowable<PlayQueueEvent> playQueueFlowable;
|
||||
|
||||
PlayQueue(final int index) {
|
||||
PlayQueue() {
|
||||
this(0, Collections.<PlayQueueItem>emptyList());
|
||||
}
|
||||
|
||||
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
|
||||
streams = Collections.synchronizedList(new ArrayList<PlayQueueItem>());
|
||||
streams.addAll(startWith);
|
||||
|
||||
queueIndex = new AtomicInteger(index);
|
||||
|
||||
changeBroadcast = BehaviorSubject.create();
|
||||
@@ -37,9 +43,6 @@ public abstract class PlayQueue {
|
||||
// single stream or local queues are always complete
|
||||
public abstract boolean isComplete();
|
||||
|
||||
// load in the background the item at index, may do nothing if the queue is incomplete
|
||||
public abstract void load(int index);
|
||||
|
||||
// load partial queue in the background, does nothing if the queue is complete
|
||||
public abstract void fetch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user