mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Merge #5126: fix(playlist): always call onCompletion when moving media sources
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5126
Closes #5125
Merge 55a4c1e15de7f100f37e38119f1da360910fd1e3 into fe41f17c38
PiperOrigin-RevId: 222612873
This commit is contained in:
parent
fe41f17c38
commit
d3095cccfe
1 changed files with 3 additions and 0 deletions
|
|
@ -365,6 +365,9 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
||||||
public final synchronized void moveMediaSource(
|
public final synchronized void moveMediaSource(
|
||||||
int currentIndex, int newIndex, @Nullable Runnable actionOnCompletion) {
|
int currentIndex, int newIndex, @Nullable Runnable actionOnCompletion) {
|
||||||
if (currentIndex == newIndex) {
|
if (currentIndex == newIndex) {
|
||||||
|
if (actionOnCompletion != null) {
|
||||||
|
actionOnCompletion.run();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mediaSourcesPublic.add(newIndex, mediaSourcesPublic.remove(currentIndex));
|
mediaSourcesPublic.add(newIndex, mediaSourcesPublic.remove(currentIndex));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue